/* Shared English Admin theme: dark teal actions, blush accents and white work surfaces. */
:root { --teal: #166c69; --teal-dark: #105653; --ink: #263e40; --muted: #617477; --line: #e1e9e7; --blush: #faedef; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f5f7f6; font-family: "Segoe UI", Arial, sans-serif; font-size: 15px; line-height: 1.6; }
a { color: var(--teal); }
button, input { font: inherit; }
button, a, .dx-button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #15847e; outline-offset: 4px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(28px, 3vw, 36px); font-weight: 600; line-height: 1.2; letter-spacing: -.7px; }
h2 { font-size: 22px; font-weight: 600; line-height: 1.35; letter-spacing: -.4px; }
.muted, .login-help { color: var(--muted); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.7px; color: var(--teal); margin-bottom: 15px; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: #f6f5f2; }
.login-shell { width: min(1080px, 100%); min-height: 690px; display: grid; grid-template-columns: 1fr 1fr; background: white; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: 0 20px 70px #2848440b; }
.login-brand { padding: 44px 52px 36px; background: linear-gradient(150deg, #fff 45%, #fcedf0); display: flex; flex-direction: column; align-items: flex-start; }
.login-logo { width: 235px; height: 235px; object-fit: contain; align-self: center; margin-bottom: 16px; }
.login-brand h1 { font-size: clamp(32px, 4vw, 46px); margin-bottom: 18px; }
.brand-description { color: var(--muted); max-width: 300px; }
.brand-note { margin-top: auto; padding-top: 35px; font-size: 12px; color: var(--muted); }
.login-form-panel { padding: 65px 56px 25px; display: flex; flex-direction: column; justify-content: center; }
.login-form-content { width: 100%; max-width: 350px; margin: auto; }
.portal-badge { display: inline-block; padding: 5px 10px; background: #eaf4f1; color: var(--teal); border-radius: 6px; font-size: 10px; letter-spacing: 1.3px; font-weight: 700; margin-bottom: 24px; }
.login-form-content h2 { font-size: 30px; margin-bottom: 9px; }
.login-form-content > p { margin-bottom: 32px; font-size: 14px; }
.field { margin-bottom: 23px; }
.field label { display: inline-block; font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.password-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.text-button { border: 0; padding: 0; background: transparent; color: var(--teal); cursor: pointer; font-size: 12px; }
.text-button:hover, .text-link:hover { text-decoration: underline; }
.login-body .dx-texteditor.dx-editor-outlined { border-radius: 7px; border-color: #ccd9d6; }
.login-body .dx-texteditor-input { min-height: 44px; padding: 10px 13px; font-family: "Segoe UI", Arial, sans-serif; }
.login-body .dx-button-mode-contained.dx-button-default { background: var(--teal); border-color: var(--teal); border-radius: 7px; }
.login-body .dx-button-mode-contained.dx-button-default.dx-state-hover { background: var(--teal-dark); border-color: var(--teal-dark); }
#sign-in .dx-button-content { padding: 13px; font-weight: 600; }
.field-error, .form-error { color: #a12940; font-size: 13px; }
.form-error ul { padding-left: 18px; }
.login-help { margin-top: 24px; text-align: center; font-size: 12px !important; }
.login-footer { text-align: center; color: var(--muted); font-size: 11px; margin: 25px 0 0; }
/* Sidebar stays fixed on desktop; mobile navigation is explicitly opened by the menu button. */
.sidebar { width: 236px; position: fixed; inset: 0 auto 0 0; background: white; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 24px 18px; z-index: 20; }
.sidebar-brand { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); padding-bottom: 30px; }
.sidebar-brand img { width: 132px; height: 132px; object-fit: contain; }
.sidebar-brand span { font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; }
.nav-section { color: var(--muted); font-size: 10px; letter-spacing: 1.4px; padding: 0 14px; margin-bottom: 10px; }
.nav-link { display: flex; align-items: center; gap: 13px; padding: 12px 15px; margin: 5px 0; border-radius: 8px; color: #526568; text-decoration: none; font-size: 14px; }
.nav-link:hover { background: #f4f7f6; }
.nav-link.is-active { color: var(--teal-dark); background: #eaf4f1; font-weight: 600; }
.nav-link span { font-size: 21px; line-height: 1; }
.sidebar-bottom { margin-top: auto; padding: 22px 8px 0; color: var(--muted); font-size: 10px; border-top: 1px solid var(--line); }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 100%; background: #348477; margin-right: 6px; }
.portal-main { margin-left: 236px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 82px; padding: 16px 40px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 20px; }
.topbar-label { font-size: 10px; letter-spacing: 1.5px; font-weight: 600; color: var(--muted); }
.user-area { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.user-details { display: flex; flex-direction: column; line-height: 1.5; text-align: right; }
.user-details strong { font-size: 13px; overflow-wrap: anywhere; }
.user-details span { font-size: 11px; color: var(--muted); }
.sign-out { border: 1px solid var(--line); color: var(--ink); background: white; border-radius: 6px; padding: 7px 12px; font-size: 12px; cursor: pointer; }
.sign-out:hover { background: #f4f7f6; }
.menu-button { display: none; background: white; border: 1px solid var(--line); border-radius: 6px; padding: 5px 11px; cursor: pointer; }
.page-content { width: 100%; max-width: 1480px; padding: 36px 40px; margin: 0 auto; }
.page-heading { margin-bottom: 29px; }
.page-heading .eyebrow { color: var(--muted); font-size: 10px; margin-bottom: 10px; }
.page-heading h1 { margin-bottom: 0; }
.welcome-card { border: 1px solid #e7e9e2; border-radius: 14px; padding: 35px; background: linear-gradient(110deg, #ecf4ef, #fcf1f2); display: flex; justify-content: space-between; align-items: center; gap: 25px; margin-bottom: 26px; }
.welcome-card h2 { font-size: 29px; }
.welcome-card p { color: #56706a; }
.primary-link { display: inline-flex; align-items: center; gap: 24px; background: var(--teal); color: white; text-decoration: none; border-radius: 7px; padding: 10px 17px; font-size: 13px; margin-top: 8px; }
.primary-link:hover { background: var(--teal-dark); }
.welcome-decoration { font: italic 56px Georgia, serif; color: #486e665e; min-width: 185px; text-align: center; }
.welcome-decoration span { display: block; font: 10px "Segoe UI", sans-serif; letter-spacing: 1px; color: #5a746e; }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.content-card { background: white; border: 1px solid var(--line); padding: 29px; border-radius: 12px; }
.content-card p { font-size: 14px; }
.content-card p:last-child { margin-bottom: 0; }
.soft-card { background: #fdfbf9; }
.account-facts { display: grid; grid-template-columns: 115px 1fr; gap: 8px 18px; font-size: 13px; margin: 22px 0; }
.account-facts dt { color: var(--muted); }
.account-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.portal-footer { margin-top: auto; padding: 20px 40px; color: var(--muted); font-size: 10px; }
.table-scroll { overflow-x: auto; }
.permission-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.permission-table caption { text-align: left; color: var(--muted); padding: 12px 0; }
.permission-table th, .permission-table td { border-bottom: 1px solid var(--line); padding: 12px; overflow-wrap: anywhere; }
.skip-link { position: absolute; left: 260px; top: -80px; background: white; padding: 10px; z-index: 100; }
.skip-link:focus { top: 8px; }
@media (max-width: 900px) {
    .login-body { padding: 20px; }
    .login-brand { padding: 30px; }
    .login-form-panel { padding: 45px 30px 25px; }
    .sidebar { width: 210px; }
    .portal-main { margin-left: 210px; }
    .topbar, .page-content { padding: 24px; }
    .overview-grid { grid-template-columns: 1fr; }
    .welcome-decoration { display: none; }
}
@media (max-width: 640px) {
    .login-body { padding: 0; background: white; }
    .login-shell { display: block; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
    .login-brand { padding: 12px 24px 0; background: white; align-items: center; }
    .login-logo { width: 150px; height: 150px; margin: 0; }
    .login-brand h1, .brand-description, .brand-note, .login-brand .eyebrow { display: none; }
    .login-form-panel { padding: 15px 28px 25px; }
    .portal-badge { margin-bottom: 18px; }
    .sidebar { display: none; width: 236px; top: 75px; box-shadow: 10px 15px 25px #294b4020; }
    .navigation-open .sidebar { display: flex; }
    .portal-main { margin-left: 0; }
    .menu-button { display: inline-block; }
    .topbar { padding: 16px; gap: 10px; min-height: 75px; }
    .topbar-label { display: none; }
    .user-area { gap: 12px; }
    .page-content { padding: 25px 18px; }
    .welcome-card { padding: 25px; }
    .welcome-card h2 { font-size: 25px; }
    .content-card { padding: 23px; }
    .portal-footer { padding: 18px; }
    .skip-link { left: 10px; }
}
/* Shared navigation, account menu and optional Razor page toolbar. */
.sidebar { overflow-y: auto; }
.nav-group-heading { margin-top: 24px; }
.topbar-title { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.portal-main { min-width: 0; }
.account-menu { position: relative; }
.account-menu summary { cursor: pointer; padding: 8px; font-size: 13px; }
.account-menu-content { position: absolute; right: 0; top: 100%; z-index: 30; min-width: 170px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 8px 24px #263e401a; }
.account-menu-content a { display: block; padding: 6px 0 12px; }
.account-menu-content .sign-out { width: 100%; text-align: left; }
.page-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 24px; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 640px) {
    .topbar-title { font-size: 15px; }
    .user-details { max-width: 100px; }
}
/* Errors use text, a strong border and a tinted surface so color is not the only cue. */
.validation-summary-errors, .form-error:not(:empty), .field-validation-error, .page-content [role="alert"] { display: block; color: #8e1830; background: #fff0f2; border: 1px solid #e9a7b3; border-left: 5px solid #b42342; border-radius: 8px; padding: 14px 18px; margin: 16px 0; font-weight: 600; overflow-wrap: anywhere; }
.validation-summary-valid, .field-validation-valid { display: none; }
.validation-summary-errors::before { content: "Please review the following"; display: block; margin-bottom: 6px; }
.validation-summary-errors ul { margin: 0; padding-left: 20px; }
.input-validation-error { border: 2px solid #b42342 !important; background: #fff8f9; }
.page-content [role="status"] { padding: 14px 18px; border: 1px solid #9bc9b0; border-left: 5px solid #24734b; border-radius: 8px; color: #185235; background: #edf8f1; }
.account-menu summary { list-style: none; display: flex; align-items: center; gap: 10px; border: 1px solid #bdd5d0; border-radius: 24px; padding: 8px 14px; color: var(--teal-dark); background: #f0f7f5; font-weight: 600; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu[open] summary, .account-menu summary:hover { background: #dceee8; }
.account-avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: white; background: var(--teal); }
.account-menu-content { min-width: 240px; padding: 8px; }
.account-menu-heading { padding: 12px; margin: 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.account-menu-heading small { display: block; color: var(--muted); font-weight: 400; }
.account-menu-content a, .account-menu-content .sign-out { display: block; padding: 12px; border: 0; border-radius: 6px; text-decoration: none; font-size: 14px; }
.account-menu-content a:hover { background: #edf5f2; }
.account-menu-content .sign-out { color: #a1253e; }
/* Entry surfaces keep labels above controls and use a consistent touch target. */
.page-content .panel, .page-content > form, .page-content > details { padding: 24px; background: white; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 24px; }
.page-content form p { margin-bottom: 18px; }
.page-content form label { display: block; font-weight: 600; margin-bottom: 8px; }
.page-content form input:not(.dx-texteditor-input):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), .page-content form select, .page-content form textarea { display: block; width: 100%; max-width: 560px; padding: 10px 12px; border: 1px solid #b8ccc6; border-radius: 6px; background: white; font: inherit; }
.page-content select[multiple] { min-height: 150px; }
.page-content button:not(.dx-button):not(.icon-action):not(.dx-widget *) { padding: 9px 16px; border: 1px solid var(--teal); border-radius: 6px; color: white; background: var(--teal); cursor: pointer; }
.icon-action { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; margin: 3px; border: 1px solid #c5d9d2; border-radius: 6px; color: var(--teal-dark); background: #f1f7f4; text-decoration: none; font-size: 20px; cursor: pointer; list-style: none; }
.icon-action::-webkit-details-marker { display: none; }
.icon-action:hover, .icon-action:focus-visible { background: #dceee8; }
.danger-action { color: #a1253e; background: #fff0f2; border-color: #e5bbc4; }
.grid-actions > details { display: inline-block; vertical-align: top; }
.grid-actions > details[open] { display: block; padding: 12px; border: 1px solid var(--line); border-radius: 8px; white-space: normal; }
.grid-actions form { min-width: 220px; white-space: normal; }
[id^="records-"]:not([id$="-source"]), #admin-users-grid, #items-grid { margin: 24px 0; }

@media (max-width: 640px) { .user-details { display: none; } .account-menu-content { max-width: calc(100vw - 32px); } }
.error-notice { color: #8e1830; background: #fff0f2; border-left: 5px solid #b42342; }
/* Empty validation summaries must stay hidden on the first page load. */
.validation-summary-valid[role="alert"], .form-error.validation-summary-valid { display: none; }
.page-content dl { display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: 12px 24px; margin: 0; }
.page-content dt { color: var(--muted); }
.page-content dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.page-content select, .operation-dialog select { appearance: auto; color: var(--ink); background: #fff; border: 1px solid #b8ccc6; border-radius: 7px; min-height: 44px; padding: 9px 12px; font: inherit; }
select option { color: #263e40; background: white; padding: 8px; }
.back-link, .secondary-button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid #b8ccc6; border-radius: 7px; background: white; color: var(--teal-dark); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; margin: 4px; }
.page-content button.secondary-button, .operation-dialog button.secondary-button { color: var(--teal-dark); background: white; border-color: #b8ccc6; }
.back-link:hover, .secondary-button:hover { background: #edf5f2; }
.page-content nav[aria-label="Catalog maintenance"] { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.page-content nav[aria-label="Catalog maintenance"] a { padding: 9px 15px; border-radius: 7px; text-decoration: none; border: 1px solid var(--line); background: white; }
.page-content nav[aria-label="Catalog maintenance"] a[aria-current="page"] { background: var(--teal); color: white; border-color: var(--teal); }
.create-entry { margin-bottom: 24px; }
.create-entry > summary { display: inline-flex; gap: 8px; align-items: center; list-style: none; padding: 10px 18px; background: var(--teal); color: white; border-radius: 7px; cursor: pointer; font-weight: 600; }
.create-entry > summary::-webkit-details-marker { display: none; }
.create-entry > form { padding-top: 24px; }
.icon-action { min-width: 32px; min-height: 32px; font-size: 16px; margin: 2px; }
.icon-action .dx-icon { font-size: 17px; }
.grid-actions { white-space: normal; }
.operation-dialog { width: min(600px, calc(100vw - 32px)); max-height: 85vh; overflow-y: auto; padding: 28px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); }
.operation-dialog::backdrop { background: #102d3980; }
.operation-dialog label { display: block; margin: 14px 0; font-weight: 600; }
.operation-dialog input:not([type="hidden"]):not([type="checkbox"]), .operation-dialog select { display: block; width: 100%; padding: 10px; border: 1px solid #b8ccc6; border-radius: 6px; font: inherit; }
.operation-dialog button[type="submit"] { background: var(--teal); color: white; border: 0; border-radius: 7px; padding: 10px 16px; cursor: pointer; }
.product-overview { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; flex-wrap: wrap; }
.product-overview h2 { margin: 0; }
.status-tag { display: inline-flex; align-items: center; border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.status-tag.published { background: #e6f4eb; color: #236241; border-color: #adcfb9; }
.status-tag.unpublished { background: #fff3db; color: #79540c; border-color: #e7cd96; }
.photo-color-group { padding: 24px 0; border-top: 1px solid #cbdad5; }
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.photo-gallery figure { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.photo-gallery img { width: 100%; height: 180px; object-fit: contain; }
.photo-gallery figcaption { margin: 12px 0; font-size: 13px; }
.assignment-list, .permission-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.assignment-list li, .permission-list li { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.assignment-list form, .permission-list form { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.assignment-list small { display: block; color: var(--muted); }
.assignment-list button, .permission-list button { margin-left: auto; }
.permission-page { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: #f0f5f2; margin: 24px 0; }
.permission-module { margin-top: 24px; }
.permission-name { min-width: 140px; font-weight: 600; }
@media (max-width: 640px) { .page-content dl { grid-template-columns: 1fr; gap: 6px; } .page-content dd { margin-bottom: 12px; } }
.operation-section { padding: 24px; margin: 24px 0; border: 1px solid var(--line); border-radius: 12px; background: white; } .operation-section > form { padding: 20px 0; border-bottom: 1px solid var(--line); }
/* Keep native visibility semantics stronger than component display declarations. */
[hidden] { display: none !important; }
/* Scope entry styling away from DevExtreme editor internals and their search icon. */
.dx-datagrid-headers { font-size: 12px; }
.grid-actions { white-space: nowrap !important; }
.grid-actions > details { display: inline-block; }
.dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.dialog-actions > button { margin: 0; }
.operation-dialog label { line-height: 1.6; }
.operation-dialog label > input:not([type="checkbox"]), .operation-dialog label > select { margin-top: 8px; }
.operation-dialog label > input[type="checkbox"] { margin-right: 8px; }
.delete-info { padding: 14px 18px; border: 1px solid #e7cda0; border-radius: 8px; background: #fff5e4; color: #73521d; }
.product-name { width: 100%; order: 3; margin: -10px 0 0; color: var(--muted); }
.page-content fieldset { min-width: 0; border: 1px solid var(--line); background: #f9fbfa; padding: 24px; margin: 0 0 24px; border-radius: 10px; }
.page-content legend { padding: 0 10px; font-weight: 600; color: var(--teal-dark); }
.page-content fieldset > p { max-width: 700px; }
.group-description { color: var(--muted); padding: 12px 16px; background: #edf3f0; border-radius: 8px; }
.permission-list { grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); }
.permission-list form { gap: 8px; }
.permission-list .permission-name { min-width: 0; flex: 1; }
.permission-list .status-tag { font-size: 11px; padding: 3px 7px; }
.permission-list li { padding: 12px; }
/* Customizable native select menus retain browser keyboard and form behavior. */
@supports (appearance: base-select) {
    select:not([multiple]), select:not([multiple])::picker(select) { appearance: base-select; }
    select:not([multiple]) { display: flex !important; align-items: center; gap: 10px; cursor: pointer; }
    select:not([multiple])::picker-icon { color: var(--teal); transition: rotate .15s; margin-left: auto; }
    select:not([multiple]):open::picker-icon { rotate: 180deg; }
    select:not([multiple])::picker(select) { border: 1px solid #c4d7d0; border-radius: 10px; padding: 6px; margin-top: 6px; background: white; box-shadow: 0 10px 30px #183c3826; max-height: 320px; }
    select:not([multiple]) option { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 9px 12px; border-radius: 6px; cursor: pointer; }
    select:not([multiple]) option:hover, select:not([multiple]) option:focus { background: #e9f4ef; color: var(--teal-dark); }
    select:not([multiple]) option:checked { background: #deeee7; color: #105653; font-weight: 600; }
    select:not([multiple]) option::checkmark { color: var(--teal); }
}
/* Row and header action controls share one compact treatment; vendor filter icons keep theme sizing. */
.icon-action, .page-content button.grid-create-button.icon-action { width: 28px; height: 28px; min-width: 28px; min-height: 28px; padding: 0; margin: 2px; vertical-align: middle; border: 1px solid #c5d9d2; border-radius: 6px; background: #f1f7f4; color: var(--teal-dark); font-size: 14px; line-height: 1; }
.icon-action .dx-icon { font-size: 14px; width: 14px; height: 14px; line-height: 14px; }
.icon-action.danger-action { color: #a1253e; background: #fff0f2; border-color: #e5bbc4; }
.page-content button.grid-create-button.icon-action { margin-right: 8px; }
.icon-action:hover, .page-content button.grid-create-button.icon-action:hover { background: #dceee8; }
.operation-dialog button.secondary-button { color: var(--teal-dark); background: white; border: 1px solid #b8ccc6; }
/* Reduce glyphs without changing the Material theme's editor alignment boxes. */
.page-content .dx-datagrid .dx-icon { font-size: 16px; }
.page-content .dx-datagrid .icon-action .dx-icon { font-size: 14px; }
