:root {
    --orange: #de5307;
    --orange-strong: #c84700;
    --grey: #4f5358;
    --grey-deep: #3f4348;
    --grey-mid: #6b7076;
    --grey-light: #e8e9ea;
    --grey-soft: #f4f4f3;
    --white: #ffffff;
    --line: rgba(79, 83, 88, .18);
    --shadow: 0 20px 55px rgba(79, 83, 88, .16);
    --shadow-soft: 0 10px 28px rgba(79, 83, 88, .11);
    --radius: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--grey-deep); font-family: Lato, "Segoe UI", Arial, sans-serif; background: var(--grey-soft); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Shared language selector */
.language-picker { position: relative; z-index: 300; }
.language-picker summary { min-width: 82px; height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 11px; color: var(--white); background: rgba(255,255,255,.08); list-style: none; user-select: none; cursor: pointer; }
.language-picker summary::-webkit-details-marker { display: none; }
.language-picker[open] summary { background: rgba(255,255,255,.16); }
.language-flag { font-size: 18px; line-height: 1; }
.language-chevron { font-size: 14px; transition: transform .2s ease; }
.language-picker[open] .language-chevron { transform: rotate(180deg); }
.language-menu { position: absolute; top: calc(100% + 10px); right: 0; width: 370px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: var(--shadow); }
[dir="rtl"] .language-menu { right: auto; left: 0; }
.language-menu a { min-width: 0; display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; color: var(--grey); text-decoration: none; font-size: 13px; }
.language-menu a:hover, .language-menu a.is-current { color: var(--orange); background: rgba(222,83,7,.09); }
.language-menu a strong { font-size: 11px; letter-spacing: .08em; }

/* Topbar */
.admin-body { min-height: 100vh; }
.admin-topbar { position: sticky; top: 0; z-index: 200; min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 clamp(18px, 4vw, 58px); background: var(--grey); box-shadow: 0 10px 30px rgba(79,83,88,.24); }
.admin-brand { width: 250px; height: 54px; display: flex; align-items: center; }
.admin-brand img { width: 100%; height: 100%; object-fit: contain; }
.admin-nav { display: flex; align-items: center; gap: 8px; }
.admin-nav > a { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; border-radius: 11px; color: rgba(255,255,255,.86); text-decoration: none; font-size: 14px; font-weight: 700; transition: .2s ease; }
.admin-nav > a:hover, .admin-nav > a.is-active { color: var(--white); background: rgba(255,255,255,.12); }
.admin-nav .admin-nav-primary { color: var(--white); background: var(--orange); }
.admin-nav .admin-nav-primary:hover { background: var(--orange-strong); }
.admin-nav-primary span { font-size: 20px; }
.logout-link { border: 1px solid rgba(255,255,255,.18); }
.admin-main { width: min(1480px, calc(100% - 48px)); margin: 0 auto; padding: 44px 0 84px; }

/* Typography and controls */
.eyebrow { display: block; margin-bottom: 9px; color: var(--orange); font-size: 12px; line-height: 1.2; letter-spacing: .16em; font-weight: 900; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 34px; }
.admin-heading h1 { margin: 0; color: var(--grey-deep); font-size: clamp(34px, 4vw, 58px); line-height: .98; letter-spacing: -.045em; font-weight: 900; }
.admin-heading p { max-width: 850px; margin: 13px 0 0; color: var(--grey-mid); font-size: 16px; line-height: 1.6; }
.compact-heading { align-items: center; }
.compact-heading h1 { font-size: clamp(32px, 4vw, 48px); }
.centered-heading { max-width: 920px; margin-inline: auto; text-align: center; }
.centered-heading .back-link { display: table; margin-inline: auto; }
.edit-heading { margin-bottom: 25px; }
.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--grey-mid); font-size: 14px; font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--orange); }
.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; border: 1px solid transparent; border-radius: 11px; text-decoration: none; font-weight: 900; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: var(--white); background: var(--orange); box-shadow: 0 10px 24px rgba(222,83,7,.22); }
.button-primary:hover { background: var(--orange-strong); }
.button-secondary { color: var(--grey); background: var(--white); border-color: var(--line); }
.button-secondary:hover { border-color: rgba(79,83,88,.45); }
.button-dark { color: var(--white); background: var(--grey); }
.button-dark:hover { background: var(--grey-deep); }
.button-large { min-height: 50px; padding: 13px 22px; }
.button-small { min-height: 37px; padding: 8px 12px; font-size: 13px; }
.button-plus { font-size: 22px; line-height: 1; }

/* Messages */
.flash { margin: 0 0 18px; padding: 14px 17px; border-left: 5px solid var(--orange); border-radius: 10px; color: var(--grey-deep); background: var(--white); box-shadow: var(--shadow-soft); font-weight: 700; }
[dir="rtl"] .flash { border-left: 0; border-right: 5px solid var(--orange); }
.flash-error { background: #fff4ed; }
.flash-success { background: #fffaf6; }

/* Dashboard */
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; margin-bottom: 40px; }
.stat-card { min-height: 155px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-soft); }
.stat-card::after { content: ""; position: absolute; right: -32px; top: -34px; width: 115px; height: 115px; border-radius: 50%; background: rgba(79,83,88,.07); }
.stat-card span { color: var(--grey-mid); font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.stat-card strong { margin: 7px 0 4px; color: var(--grey); font-size: 46px; line-height: 1; }
.stat-card small { color: var(--grey-mid); }
.stat-active { border-top: 5px solid var(--orange); }
.stat-active strong { color: var(--orange); }
.stat-inactive { border-top: 5px solid var(--grey); }
.admin-section { margin-top: 38px; }
.section-heading-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; }
.section-heading-row h2 { margin: 0; font-size: clamp(23px, 2.5vw, 32px); letter-spacing: -.025em; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.category-card { min-height: 126px; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-soft); text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.category-card:hover { transform: translateY(-3px); border-color: rgba(222,83,7,.55); }
.category-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; color: var(--white); background: var(--orange); font-size: 28px; }
.category-card strong, .category-card small { display: block; }
.category-card strong { font-size: 20px; }
.category-card small { margin-top: 6px; color: var(--grey-mid); }
.category-arrow { color: var(--orange); font-size: 24px; }

.analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }
.chart-card { min-height: 300px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-soft); }
.chart-card-wide { grid-column: 1 / -1; min-height: 330px; }
.chart-card header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.chart-card h3 { margin: 0; font-size: 18px; }
.chart-card header > strong { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--white); background: var(--grey); }
.bar-chart { display: grid; gap: 18px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 150px) 1fr 34px; align-items: center; gap: 12px; }
.bar-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--grey-mid); font-size: 13px; font-weight: 700; }
.bar-row > div { height: 12px; overflow: hidden; border-radius: 99px; background: var(--grey-light); }
.bar-row i { display: block; min-width: 5px; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), #f08348); }
.bar-row > strong { text-align: right; }
.compact-bars { gap: 12px; }
.chart-empty { min-height: 180px; display: grid; place-items: center; margin: 0; padding: 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--grey-mid); text-align: center; }
.line-chart-wrap { overflow: hidden; }
.line-chart { width: 100%; height: 220px; }
.chart-axis { stroke: var(--grey); stroke-width: 2; }
.chart-gridline { stroke: rgba(79,83,88,.15); stroke-width: 1; stroke-dasharray: 5 7; }
.chart-line { fill: none; stroke: var(--orange); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { fill: var(--white); stroke: var(--orange); stroke-width: 4; }
.line-chart-labels { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 2px; color: var(--grey-mid); font-size: 10px; text-align: center; }

/* Report table */
.report-list-heading { align-items: center; }
.list-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.search-box { min-width: 290px; height: 45px; display: flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; }
.list-tools select { min-height: 45px; padding: 0 35px 0 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--grey); background: var(--white); }
.report-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow-soft); }
.report-table { width: 100%; min-width: 1230px; border-collapse: collapse; }
.report-table th, .report-table td { padding: 15px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
[dir="rtl"] .report-table th, [dir="rtl"] .report-table td { text-align: right; }
.report-table th { color: var(--grey-mid); background: #fafaf9; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.report-table tbody tr:hover { background: #fff9f5; }
.report-table tbody tr:last-child td { border-bottom: 0; }
.report-code { display: block; color: var(--grey); white-space: nowrap; }
.copy-link { margin-top: 5px; padding: 0; border: 0; color: var(--orange); background: transparent; font-size: 12px; font-weight: 900; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 99px; font-size: 12px; font-weight: 900; white-space: nowrap; }
.status-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-badge.is-active { color: var(--orange); background: rgba(222,83,7,.1); }
.status-badge.is-inactive { color: var(--grey); background: rgba(79,83,88,.1); }
.category-pill { display: inline-flex; padding: 7px 10px; border-radius: 99px; color: var(--grey); background: rgba(79,83,88,.1); font-size: 12px; font-weight: 900; }
.public-hidden-note { display: block; margin-top: 5px; color: var(--orange); font-size: 11px; }
.table-actions { display: flex; align-items: center; gap: 6px; }
.table-actions form { margin: 0; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--grey); background: var(--white); text-decoration: none; font-weight: 900; }
.icon-button:hover { color: var(--orange); border-color: rgba(222,83,7,.5); background: rgba(222,83,7,.06); }
.icon-danger:hover { color: var(--orange-strong); }
.empty-state, .table-empty-filter { padding: 42px; border: 1px dashed rgba(79,83,88,.35); border-radius: 18px; color: var(--grey-mid); background: rgba(255,255,255,.55); text-align: center; }
.empty-state strong { color: var(--grey); font-size: 20px; }
.empty-state p { margin-bottom: 0; }
.table-empty-filter { margin-top: 14px; }

/* Forms */
.panel-form, .editor-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-soft); }
.starter-form { width: min(900px, 100%); margin: 0 auto; padding: clamp(24px, 4vw, 42px); }
.form-section-title { display: grid; grid-template-columns: 48px 1fr; align-items: start; gap: 15px; margin-bottom: 26px; }
.form-section-title > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: var(--white); background: var(--orange); font-weight: 900; }
.form-section-title h2 { margin: 0 0 6px; font-size: 24px; }
.form-section-title p { margin: 0; color: var(--grey-mid); line-height: 1.5; }
.form-section-title.with-action { grid-template-columns: 48px 1fr auto; }
.form-error-summary { margin-bottom: 20px; padding: 13px 15px; border-left: 4px solid var(--orange); border-radius: 8px; color: var(--grey); background: #fff3ea; font-weight: 700; }
.form-grid { display: grid; gap: 19px; }
.form-grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-span-2 { grid-column: 1 / -1; }
.form-grid label, .login-form label { display: flex; flex-direction: column; gap: 8px; color: var(--grey); font-size: 13px; font-weight: 900; }
.form-grid input, .form-grid select, .form-grid textarea, .login-form input, .analysis-title-fields input, .analysis-row input, .pass-row input { width: 100%; min-height: 47px; padding: 11px 13px; border: 1px solid rgba(79,83,88,.25); border-radius: 10px; color: var(--grey-deep); background: var(--white); outline: 0; transition: border-color .2s ease, box-shadow .2s ease; }
.form-grid textarea { min-height: 100px; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .login-form input:focus, .analysis-title-fields input:focus, .analysis-row input:focus, .pass-row input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(222,83,7,.13); }
.form-grid input[aria-invalid="true"], .form-grid select[aria-invalid="true"] { border-color: var(--orange); background: #fff8f3; }
.form-grid label > small { color: var(--grey-mid); font-weight: 400; line-height: 1.45; }
.required-mark { color: var(--orange); }
.field-error { color: var(--orange) !important; font-weight: 900 !important; }
.url-preview { display: inline-flex; width: fit-content; padding: 6px 9px; border-radius: 7px; color: var(--orange) !important; background: rgba(222,83,7,.08); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.spaced-top { margin-top: 22px; }

/* Switches */
.switch-label { min-height: 72px; flex-direction: row !important; align-items: center; justify-content: space-between; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; }
.switch { width: 48px; height: 27px; position: relative; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(79,83,88,.25); transition: .2s ease; }
.switch i::after { content: ""; position: absolute; top: 4px; left: 4px; width: 19px; height: 19px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 7px rgba(79,83,88,.25); transition: .2s ease; }
.switch input:checked + i { background: var(--orange); }
.switch input:checked + i::after { transform: translateX(21px); }
[dir="rtl"] .switch i::after { left: auto; right: 4px; }
[dir="rtl"] .switch input:checked + i::after { transform: translateX(-21px); }
.switch-large { width: 58px; height: 32px; }
.switch-large i::after { width: 24px; height: 24px; }
.switch-large input:checked + i::after { transform: translateX(26px); }
[dir="rtl"] .switch-large input:checked + i::after { transform: translateX(-26px); }

/* Editor */
.editor-layout { display: grid; grid-template-columns: 235px minmax(0,1fr); gap: 22px; align-items: start; }
.editor-sidebar { position: sticky; top: 100px; display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: var(--shadow-soft); }
.editor-sidebar a { padding: 12px 13px; border-radius: 9px; color: var(--grey-mid); text-decoration: none; font-size: 13px; font-weight: 800; }
.editor-sidebar a:hover { color: var(--orange); background: rgba(222,83,7,.07); }
.editor-content { min-width: 0; display: grid; gap: 20px; }
.editor-card { padding: clamp(20px, 3vw, 32px); scroll-margin-top: 105px; }
.media-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }
.upload-card { min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fafaf9; }
.field-title { color: var(--grey); font-size: 13px; font-weight: 900; }
.upload-card > img { width: 100%; height: 240px; object-fit: cover; border-radius: 11px; }
.upload-placeholder { min-height: 150px; display: grid; place-items: center; padding: 20px; border: 1px dashed rgba(79,83,88,.3); border-radius: 11px; color: var(--grey-mid); text-align: center; }
.checkbox-line { display: flex; flex-direction: row !important; align-items: center; gap: 8px !important; }
.checkbox-line input { width: auto; min-height: 0; }
.existing-gallery { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.existing-gallery label { min-width: 0; display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.existing-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.existing-gallery span { display: flex; align-items: center; gap: 5px; padding: 7px; font-size: 11px; }
.repeat-list { display: grid; gap: 15px; }
.repeat-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fafaf9; }
.repeat-card > header { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; color: var(--white); background: var(--grey); }
.remove-repeat, [data-remove-analysis-row] { width: 31px; height: 31px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; color: var(--white); background: transparent; font-size: 20px; }
.pass-grid { display: grid; grid-template-columns: 115px repeat(5, minmax(95px,1fr)); gap: 8px; align-items: center; padding: 9px 12px; }
.pass-grid-head { color: var(--grey-mid); background: var(--grey-light); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.pass-row + .pass-row { border-top: 1px solid var(--line); }
.pass-row strong { font-size: 11px; letter-spacing: .05em; }
.pass-row-input strong { color: var(--grey); }
.pass-row-accepted strong { color: var(--orange); }
.pass-row-rejected strong { color: var(--grey-mid); }
.analysis-title-fields { display: grid; grid-template-columns: 80px minmax(160px,1fr); gap: 8px; width: min(500px, calc(100% - 45px)); }
.analysis-title-fields input { min-height: 36px; border-color: rgba(255,255,255,.25); color: var(--white); background: rgba(255,255,255,.1); }
.analysis-title-fields input::placeholder { color: rgba(255,255,255,.7); }
.analysis-rows { display: grid; }
.analysis-row { display: grid; grid-template-columns: 1.2fr 1fr .7fr 1.7fr 36px; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.analysis-row [data-remove-analysis-row] { color: var(--grey); border-color: var(--line); background: var(--white); }
.inline-add { margin: 12px; padding: 9px 12px; border: 1px dashed rgba(222,83,7,.45); border-radius: 9px; color: var(--orange); background: rgba(222,83,7,.06); font-weight: 900; }
.publication-toggle { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fafaf9; }
.publication-toggle span:first-child { display: grid; gap: 5px; }
.publication-toggle small { color: var(--grey-mid); line-height: 1.4; }
.customer-public-toggle { margin-top: 2px; }
.sticky-save-bar { position: sticky; bottom: 14px; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 17px; border: 1px solid rgba(79,83,88,.2); border-radius: 16px; color: var(--grey-mid); background: rgba(255,255,255,.94); box-shadow: 0 14px 45px rgba(79,83,88,.2); backdrop-filter: blur(12px); }
.sticky-save-bar > div { display: flex; gap: 10px; }

/* Login */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: var(--grey); }
.login-shell { width: min(1120px, 100%); min-height: 700px; display: grid; grid-template-columns: 1.03fr .97fr; overflow: hidden; border: 1px solid rgba(255,255,255,.3); border-radius: 28px; background: var(--white); box-shadow: 0 35px 85px rgba(63,67,72,.35); }
.login-panel { position: relative; display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 6vw, 72px); }
.login-toolbar { position: absolute; top: 24px; right: 24px; }
[dir="rtl"] .login-toolbar { right: auto; left: 24px; }
.login-toolbar .language-picker summary { color: var(--grey); border-color: var(--line); background: var(--white); }
.login-brand { width: 245px; margin-bottom: 52px; }
.login-copy h1 { margin: 0; color: var(--grey); font-size: clamp(42px, 5vw, 66px); line-height: .94; letter-spacing: -.05em; }
.login-copy p { max-width: 520px; margin: 21px 0 27px; color: var(--grey-mid); font-size: 16px; line-height: 1.65; }
.login-form { display: grid; gap: 18px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 86px; }
[dir="rtl"] .password-field input { padding-right: 13px; padding-left: 86px; }
.password-toggle { position: absolute; right: 7px; top: 7px; min-height: 33px; padding: 0 11px; border: 0; border-radius: 8px; color: var(--grey); background: var(--grey-light); font-size: 12px; font-weight: 900; }
[dir="rtl"] .password-toggle { right: auto; left: 7px; }
.login-note { margin: 21px 0 0; color: var(--grey-mid); font-size: 12px; }
.login-visual { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--orange); }
.login-visual-grid { position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px); background-size: 44px 44px; }
.login-symbol-wrap { position: relative; width: min(72%, 390px); aspect-ratio: 1; display: grid; place-items: center; }
.login-symbol-wrap::before { content: ""; position: absolute; inset: -12%; border: 2px solid rgba(255,255,255,.28); border-radius: 50%; }
.login-symbol-wrap img { position: relative; z-index: 2; width: 52%; max-height: 75%; }
.login-disc { position: absolute; border-radius: 50%; }
.login-disc-one { width: 100%; height: 100%; background: var(--grey); box-shadow: 0 22px 45px rgba(79,83,88,.3); }
.login-disc-two { width: 68%; height: 68%; top: -12%; right: -18%; border: 2px solid rgba(255,255,255,.42); background: rgba(255,255,255,.08); }
.login-visual-caption { position: absolute; right: 34px; bottom: 30px; display: grid; gap: 4px; color: var(--white); text-align: right; }
.login-visual-caption strong { font-size: 20px; letter-spacing: .08em; }
.login-visual-caption span { font-size: 12px; opacity: .78; }

@media (max-width: 1100px) {
    .admin-topbar { align-items: flex-start; padding-block: 12px; }
    .admin-nav { justify-content: flex-end; flex-wrap: wrap; }
    .editor-layout { grid-template-columns: 1fr; }
    .editor-sidebar { position: static; display: flex; overflow-x: auto; }
    .editor-sidebar a { white-space: nowrap; }
    .pass-grid { grid-template-columns: 100px repeat(5, minmax(105px,1fr)); min-width: 780px; }
    .pass-card { overflow-x: auto; }
}
@media (max-width: 900px) {
    .admin-topbar { position: relative; flex-direction: column; align-items: stretch; gap: 8px; }
    .admin-brand { width: 215px; }
    .admin-nav { justify-content: flex-start; }
    .admin-main { width: min(100% - 30px, 1480px); padding-top: 30px; }
    .admin-heading { align-items: flex-start; flex-direction: column; }
    .stats-grid, .category-grid { grid-template-columns: 1fr; }
    .analytics-grid { grid-template-columns: 1fr; }
    .chart-card-wide { grid-column: auto; }
    .form-grid-2, .media-editor-grid { grid-template-columns: 1fr; }
    .form-span-2 { grid-column: auto; }
    .report-table { min-width: 0; }
    .report-table thead { display: none; }
    .report-table, .report-table tbody, .report-table tr, .report-table td { display: block; width: 100%; }
    .report-table tbody { display: grid; gap: 13px; padding: 13px; }
    .report-table tr { padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
    .report-table td { display: grid; grid-template-columns: minmax(115px, 34%) 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
    .report-table td::before { content: attr(data-label); color: var(--grey-mid); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
    .report-table td:last-child { border-bottom: 0; }
    .table-actions { display: flex !important; justify-content: flex-end; }
    .table-actions::before { margin-right: auto; }
    [dir="rtl"] .table-actions::before { margin-right: 0; margin-left: auto; }
    .login-shell { grid-template-columns: 1fr; min-height: 0; }
    .login-visual { min-height: 330px; }
    .login-symbol-wrap { width: 250px; }
}
@media (max-width: 640px) {
    .admin-topbar { padding-inline: 15px; }
    .admin-nav > a { min-height: 38px; padding-inline: 10px; font-size: 12px; }
    .admin-nav .logout-link { margin-left: auto; }
    [dir="rtl"] .admin-nav .logout-link { margin-left: 0; margin-right: auto; }
    .language-picker summary { min-width: 72px; height: 38px; }
    .language-menu { position: fixed; top: 112px; right: 12px; left: 12px; width: auto; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .login-toolbar .language-menu { top: 74px; }
    .admin-heading h1 { font-size: 36px; }
    .admin-heading .button-large { width: 100%; }
    .section-heading-row, .report-list-heading { align-items: stretch; flex-direction: column; }
    .list-tools, .search-box { width: 100%; min-width: 0; }
    .list-tools select { width: 100%; }
    .bar-row { grid-template-columns: 92px 1fr 28px; }
    .line-chart-labels span:nth-child(even) { visibility: hidden; }
    .starter-form { padding: 22px 17px; }
    .form-section-title, .form-section-title.with-action { grid-template-columns: 42px 1fr; }
    .form-section-title > span { width: 42px; height: 42px; }
    .form-section-title.with-action .button { grid-column: 1 / -1; }
    .form-actions, .sticky-save-bar { align-items: stretch; flex-direction: column; }
    .form-actions .button, .sticky-save-bar .button { width: 100%; }
    .sticky-save-bar > div { display: grid; grid-template-columns: 1fr; }
    .analysis-row { grid-template-columns: 1fr 1fr; }
    .analysis-row input:nth-child(4) { grid-column: 1 / -1; }
    .analysis-row button { grid-column: 2; justify-self: end; }
    .publication-toggle { align-items: flex-start; }
    .login-body { padding: 12px; }
    .login-shell { border-radius: 20px; }
    .login-panel { padding: 92px 24px 34px; }
    .login-toolbar { top: 20px; right: 20px; }
    [dir="rtl"] .login-toolbar { right: auto; left: 20px; }
    .login-brand { width: 210px; margin-bottom: 38px; }
    .login-copy h1 { font-size: 45px; }
    .login-visual { min-height: 285px; }
}


/* Official report asset library */
.machine-banner-preview { min-height: 150px; display: grid; place-items: center; margin-top: 16px; overflow: hidden; border: 1px dashed var(--line); border-radius: 16px; color: var(--grey-mid); background: var(--grey-soft); }
.machine-banner-preview img { width: 100%; max-height: 320px; object-fit: contain; background: var(--white); }
.asset-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 28px 0 12px; }
.asset-library-heading strong, .asset-library-heading small { display: block; }
.asset-library-heading small { margin-top: 5px; color: var(--grey-mid); line-height: 1.45; }
.asset-library-heading > span { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--white); background: var(--orange); font-weight: 900; }
.sorting-map-library { display: grid; gap: 12px; }
.asset-library-group { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.asset-library-group > summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; color: var(--grey); background: var(--grey-soft); font-weight: 900; cursor: pointer; }
.asset-library-group > summary small { color: var(--orange); }
.sorting-map-choice-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; max-height: 620px; overflow-y: auto; padding: 15px; }
.sorting-map-choice { position: relative; display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); cursor: pointer; }
.sorting-map-choice:has(input:checked) { border-color: var(--orange); box-shadow: inset 0 0 0 2px rgba(222,83,7,.16); }
.sorting-map-choice input { position: absolute; top: 8px; right: 8px; width: 19px; height: 19px; accent-color: var(--orange); }
.sorting-map-thumb { height: 118px; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: var(--grey-soft); }
.sorting-map-thumb img { width: 100%; height: 100%; object-fit: contain; }
.sorting-map-choice strong { overflow: hidden; color: var(--grey); text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
@media (max-width: 980px) { .sorting-map-choice-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 680px) { .sorting-map-choice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 520px; } .sorting-map-thumb { height: 100px; } }

/* =========================================================
   3U Vision Test Reports legacy base
   ========================================================= */

/* Global navigation: light, compact and aligned to the official palette. */
.admin-topbar {
    min-height: 68px;
    align-items: center;
    padding-block: 7px;
    color: var(--grey);
    background: rgba(255, 255, 255, .98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 28px rgba(79, 83, 88, .12);
    backdrop-filter: blur(14px);
}
.admin-brand { width: 188px; height: 42px; flex: 0 0 auto; }
.admin-brand img { object-position: left center; }
.admin-nav { min-width: 0; }
.admin-nav > a {
    min-height: 40px;
    color: var(--grey);
    white-space: nowrap;
}
.admin-nav > a:hover,
.admin-nav > a.is-active { color: var(--orange); background: rgba(222, 83, 7, .08); }
.admin-nav .admin-nav-primary,
.admin-nav .admin-nav-primary.is-active { color: var(--white); background: var(--orange); }
.admin-nav .admin-nav-primary:hover { color: var(--white); background: var(--orange-strong); }
.logout-link { border-color: var(--line); }
.nav-user { min-width: 0; display: grid; gap: 2px; padding: 4px 10px; border-left: 1px solid var(--line); }
.nav-user strong { max-width: 150px; overflow: hidden; color: var(--grey); text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.nav-user small { color: var(--grey-mid); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.mobile-menu-toggle { display: none; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--grey); background: var(--white); font-size: 21px; }

/* Uniform language selector with real flag assets. */
.admin-topbar .language-picker summary {
    min-width: 76px;
    height: 40px;
    color: var(--grey);
    border-color: var(--line);
    background: var(--white);
}
.admin-topbar .language-picker[open] summary,
.admin-topbar .language-picker summary:hover { color: var(--orange); border-color: rgba(222, 83, 7, .45); background: rgba(222, 83, 7, .06); }
.language-flag { width: 23px; height: 16px; flex: 0 0 auto; display: block; object-fit: cover; border: 1px solid rgba(79, 83, 88, .16); border-radius: 3px; box-shadow: 0 1px 2px rgba(79, 83, 88, .12); }
.language-menu { width: 400px; max-height: none; overflow: visible; }
.language-menu a { grid-template-columns: 25px 1fr auto; min-height: 43px; }
.language-menu a .language-flag { width: 24px; height: 17px; }
.language-menu a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Login: one compact card, one horizontal logo and no language control. */
.login-body {
    min-height: 100svh;
    padding: clamp(18px, 4vw, 46px);
    background:
        radial-gradient(circle at 15% 15%, rgba(222,83,7,.18), transparent 28%),
        linear-gradient(135deg, var(--grey-deep), var(--grey));
}
.login-single-shell { width: min(610px, 100%); }
.login-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 34px 85px rgba(42, 45, 48, .38);
}
.login-logo-panel {
    min-height: 150px;
    display: grid;
    place-items: center;
    padding: 30px clamp(28px, 8vw, 60px);
    background: var(--grey);
}
.login-logo-panel img { width: min(430px, 100%); max-height: 90px; object-fit: contain; }
.login-card-body { padding: clamp(28px, 6vw, 48px); }
.login-card-body h1 { margin: 0; color: var(--grey-deep); font-size: clamp(36px, 8vw, 52px); line-height: .98; letter-spacing: -.045em; }
.login-intro { margin: 14px 0 25px; color: var(--grey-mid); line-height: 1.6; }
.login-card .button-large { width: 100%; margin-top: 2px; }
.login-card .flash { margin-bottom: 18px; }

/* Transient notifications. */
.flash { transition: opacity .32s ease, transform .32s ease, margin .32s ease, padding .32s ease, max-height .32s ease; max-height: 120px; }
.flash.is-hiding { max-height: 0; margin-block: 0; padding-block: 0; opacity: 0; transform: translateY(-8px); overflow: hidden; }

/* Dashboard category drill-down. */
.category-card { appearance: none; width: 100%; color: inherit; text-align: left; cursor: pointer; }
.category-card[aria-expanded="true"] { border-color: var(--orange); box-shadow: 0 13px 32px rgba(222,83,7,.14); }
.category-card[aria-expanded="true"] .category-arrow { transform: rotate(180deg); }
.category-arrow { transition: transform .2s ease; }
.category-panels { margin-top: 14px; }
.category-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow-soft); }
.category-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; color: var(--white); background: var(--grey); }
.category-panel > header strong { font-size: 18px; }
.category-panel > header button { padding: 8px 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 9px; color: var(--white); background: transparent; font-weight: 800; }
.category-panel > header button:hover { background: rgba(255,255,255,.1); }
.group-chip-list { display: flex; flex-wrap: wrap; gap: 9px; padding: 18px; }
.group-chip { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 8px 10px 8px 13px; border: 1px solid var(--line); border-radius: 99px; color: var(--grey); background: var(--white); }
.group-chip:hover { color: var(--orange); border-color: rgba(222,83,7,.45); background: rgba(222,83,7,.06); }
.group-chip strong { min-width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: var(--grey); font-size: 11px; }

/* Activity chart: all days in a month, navigable by month or year. */
.activity-chart-card { min-height: 390px; padding: clamp(18px, 3vw, 28px); }
.chart-toolbar { align-items: flex-start !important; margin-bottom: 18px !important; }
.chart-toolbar h3 { font-size: 22px; }
.chart-toolbar p { margin: 6px 0 0; color: var(--grey-mid); text-transform: capitalize; }
.chart-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.segmented-control { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--grey-soft); }
.segmented-control button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; color: var(--grey-mid); background: transparent; font-size: 12px; font-weight: 900; }
.segmented-control button.is-active { color: var(--white); background: var(--orange); }
.chart-nav { width: 39px; height: 39px; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--grey); background: var(--white); font-size: 18px; font-weight: 900; }
.chart-nav:hover { color: var(--orange); border-color: rgba(222,83,7,.45); }
.activity-chart-summary { display: inline-flex; align-items: baseline; gap: 8px; margin-bottom: 18px; padding: 9px 12px; border-radius: 10px; color: var(--grey-mid); background: var(--grey-soft); font-size: 12px; }
.activity-chart-summary strong { color: var(--orange); font-size: 22px; }
.activity-chart-scroll { width: 100%; overflow-x: auto; padding: 4px 2px 9px; scrollbar-color: rgba(79,83,88,.35) transparent; }
.activity-chart { min-width: 980px; height: 235px; display: grid; grid-template-columns: repeat(31, minmax(20px, 1fr)); gap: 5px; align-items: stretch; padding: 12px 8px 0; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); background-image: repeating-linear-gradient(to top, transparent 0, transparent 54px, rgba(79,83,88,.08) 55px); }
.activity-chart.year-view { min-width: 760px; grid-template-columns: repeat(12, minmax(44px,1fr)); gap: 12px; }
.activity-column { min-width: 0; height: 100%; display: grid; grid-template-rows: 22px 1fr 25px; gap: 4px; align-items: end; text-align: center; }
.activity-count { min-height: 18px; color: var(--grey); font-size: 11px; font-weight: 900; }
.activity-bar-wrap { width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.activity-bar { width: min(15px, 72%); min-height: 2px; display: block; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #f08a52, var(--orange)); transition: height .25s ease, transform .18s ease; }
.activity-bar:hover { transform: scaleX(1.15); }
.activity-column small { color: var(--grey-mid); font-size: 10px; }
.activity-chart.year-view .activity-bar { width: min(30px, 64%); }
.activity-chart.year-view .activity-column small { font-size: 11px; }

/* Report list: status is visible at a glance and actions are unambiguous. */
.report-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow-soft); }
.report-row { transition: background .2s ease; }
.report-row-active { box-shadow: inset 4px 0 #079947; }
.report-row-inactive { box-shadow: inset 4px 0 var(--orange); background: rgba(222,83,7,.025); }
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 99px; white-space: nowrap; font-size: 11px; font-weight: 900; }
.status-badge i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-badge.is-active { color: #087c3e; background: #e5f5ec; }
.status-badge.is-inactive { color: #b64207; background: #fff0e7; }
.table-actions { min-width: 178px; flex-wrap: nowrap; }
.icon-button { flex: 0 0 auto; }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-enable { color: #087c3e; }
.icon-disable { color: var(--orange); }
.icon-danger { color: #a63322; }
.copy-link { margin-top: 5px; padding: 0; border: 0; color: var(--orange); background: none; font-size: 11px; font-weight: 900; }

/* New-report card and common form spacing. */
.centered-heading { width: min(900px, 100%); }
.starter-form { width: min(840px, 100%); padding: clamp(26px, 5vw, 48px); }
.starter-form .form-actions { align-items: center; }

/* User management, only rendered for Owner. */
.users-layout { display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.45fr); gap: 22px; align-items: start; }
.user-create-card { position: sticky; top: 92px; padding: clamp(20px, 3vw, 30px); }
.user-form { display: grid; gap: 16px; }
.user-form > label,
.user-edit-grid > label { display: flex; flex-direction: column; gap: 7px; color: var(--grey); font-size: 12px; font-weight: 900; }
.user-form input,
.user-form select,
.user-edit-grid input,
.user-edit-grid select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid rgba(79,83,88,.25); border-radius: 10px; color: var(--grey-deep); background: var(--white); outline: 0; }
.user-form input:focus,
.user-form select:focus,
.user-edit-grid input:focus,
.user-edit-grid select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(222,83,7,.13); }
.user-form label small { color: var(--grey-mid); font-weight: 400; }
.users-list { display: grid; gap: 14px; }
.user-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--white); box-shadow: var(--shadow-soft); }
.user-card.is-disabled { opacity: .76; }
.user-card > header { display: grid; grid-template-columns: 46px minmax(0,1fr) auto auto; gap: 12px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--grey-soft); }
.user-avatar { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; color: var(--white); background: var(--orange); font-size: 19px; font-weight: 900; }
.user-card > header > div:nth-child(2) { min-width: 0; }
.user-card > header > div:nth-child(2) strong,
.user-card > header > div:nth-child(2) span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card > header > div:nth-child(2) span { margin-top: 3px; color: var(--grey-mid); font-size: 12px; }
.role-badge { padding: 6px 9px; border-radius: 99px; color: var(--grey); background: rgba(79,83,88,.11); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.role-owner { color: var(--white); background: var(--orange); }
.user-edit-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 18px; }
.user-edit-grid .switch-label { align-self: end; }
.user-edit-grid > .button { align-self: end; }
.user-card > footer { display: flex; align-items: center; justify-content: flex-end; min-height: 52px; padding: 10px 18px; border-top: 1px solid var(--line); }
.user-card > footer small { margin-right: auto; color: var(--grey-mid); }
.button-danger { color: #a63322; border-color: rgba(166,51,34,.25); background: #fff5f2; }
.button-danger:hover { border-color: rgba(166,51,34,.5); background: #ffebe5; }

/* Formula-based mass-balance editor. */
.formula-help { margin: -8px 0 18px; padding: 13px 15px; border-left: 4px solid var(--orange); border-radius: 0 10px 10px 0; color: var(--grey-mid); background: rgba(222,83,7,.06); line-height: 1.55; }
.mass-table-scroll { width: 100%; overflow-x: auto; }
.pass-grid.mass-grid { grid-template-columns: minmax(92px,.72fr) minmax(92px,.72fr) minmax(125px,1fr) minmax(125px,1fr) minmax(105px,.8fr) minmax(105px,.8fr) minmax(135px,1fr); min-width: 890px; gap: 8px; }
.mass-grid output { min-height: 42px; display: flex; align-items: center; justify-content: flex-end; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--grey); background: var(--white); text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 800; }
.mass-grid input { min-height: 42px; font-size: 12px; }
.throughput-input { position: relative; display: block; }
.throughput-input input { padding-right: 44px; }
.throughput-input small { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--grey-mid); font-size: 10px; pointer-events: none; }
.mass-balance-status { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 12px; align-items: center; padding: 12px 15px; border-top: 1px solid var(--line); font-size: 12px; }
.mass-balance-status strong { color: var(--grey); }
.mass-balance-status span,
.mass-balance-status small { color: var(--grey-mid); }
.mass-balance-status.is-ok { box-shadow: inset 4px 0 #079947; background: #f3fbf6; }
.mass-balance-status.is-warning { box-shadow: inset 4px 0 var(--orange); background: #fff8f3; }

@media (max-width: 1160px) {
    .admin-topbar { flex-wrap: wrap; }
    .admin-nav { flex: 1 1 auto; justify-content: flex-end; flex-wrap: wrap; }
    .users-layout { grid-template-columns: 1fr; }
    .user-create-card { position: static; }
}

@media (max-width: 900px) {
    .admin-topbar { position: sticky; flex-direction: row; align-items: center; gap: 12px; padding-block: 10px; }
    .admin-brand { width: 170px; height: 38px; }
    .mobile-menu-toggle { display: grid; place-items: center; margin-left: auto; }
    [dir="rtl"] .mobile-menu-toggle { margin-left: 0; margin-right: auto; }
    .admin-nav { position: absolute; top: calc(100% + 1px); right: 15px; left: 15px; display: none; align-items: stretch; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); box-shadow: var(--shadow); }
    .admin-nav.is-open { display: flex; }
    .admin-nav > a { justify-content: flex-start; width: 100%; }
    .admin-nav .language-picker { width: 100%; }
    .admin-nav .language-picker summary { width: 100%; justify-content: flex-start; }
    .admin-nav .language-menu { position: static; width: 100%; margin-top: 7px; box-shadow: none; }
    .nav-user { border-left: 0; border-top: 1px solid var(--line); padding: 11px 10px 4px; }
    .logout-link { margin: 0 !important; }
    .users-layout { grid-template-columns: 1fr; }
    .user-edit-grid { grid-template-columns: 1fr; }
    .report-row-active,
    .report-row-inactive { box-shadow: none; }
    .report-row-active { border-left: 5px solid #079947 !important; }
    .report-row-inactive { border-left: 5px solid var(--orange) !important; }
}

@media (max-width: 640px) {
    .admin-brand { width: 150px; height: 34px; }
    .admin-main { width: min(100% - 24px, 1480px); }
    .language-menu { grid-template-columns: 1fr 1fr; }
    .login-logo-panel { min-height: 118px; padding-block: 24px; }
    .login-logo-panel img { max-height: 68px; }
    .login-card-body { padding: 27px 21px 30px; }
    .login-card-body h1 { font-size: 38px; }
    .chart-toolbar { flex-direction: column; }
    .chart-controls { width: 100%; justify-content: space-between; }
    .segmented-control { flex: 1 1 auto; }
    .segmented-control button { flex: 1; }
    .activity-chart { min-width: 860px; }
    .user-card > header { grid-template-columns: 42px minmax(0,1fr); }
    .user-card > header .role-badge,
    .user-card > header .status-badge { justify-self: start; }
    .mass-balance-status { grid-template-columns: 1fr; }
}
.analytics-grid-v22 { margin-top: 17px; }
.analytics-grid-v22 .chart-card { min-height: 270px; }
@media (max-width: 900px) { .analytics-grid-v22 { grid-template-columns: 1fr; } }

/* =========================================================
   3U Vision Test Reports v2.3
   Brand/UI standardisation
   ========================================================= */
:root {
    --food: #c83b35;
    --recycling: #2f8654;
    --seeds: #3078a8;
    --title-font: Conthrax, Lato, "Segoe UI", sans-serif;
}
body, button, input, select, textarea { font-family: Lato, "Segoe UI", Arial, sans-serif; }
h1, h2, h3, .form-section-title h2, .login-brand-copy h1, .login-form-heading h2 { font-family: var(--title-font); font-weight: 700; letter-spacing: .01em; }
body, .admin-heading h1, .section-heading-row h2, .report-table, label, input, select, textarea { color: var(--grey); }

/* Standard controls */
label { min-width: 0; }
.field-label { min-height: 22px; display: flex; align-items: baseline; flex-wrap: nowrap; gap: 5px; color: var(--grey); font-size: 13px; font-weight: 900; line-height: 1.25; }
.field-label small { margin-left: auto; color: var(--grey-mid); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.required-mark { display: inline; flex: 0 0 auto; margin: 0; color: var(--orange); line-height: 1; }
.form-grid label, .panel-form label, .report-editor label, .user-form label, .user-edit-grid label { display: flex; flex-direction: column; gap: 8px; color: var(--grey); font-size: 13px; font-weight: 900; }
.form-grid input, .form-grid select, .form-grid textarea, .panel-form input, .panel-form select, .panel-form textarea, .report-editor input, .report-editor select, .report-editor textarea, .user-form input, .user-form select, .user-edit-grid input, .user-edit-grid select {
    width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid rgba(79,83,88,.28); border-radius: 11px; color: var(--grey); background-color: var(--white); outline: 0; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.form-grid select, .panel-form select, .report-editor select, .user-form select, .user-edit-grid select {
    appearance: none; padding-right: 42px; background-image: linear-gradient(45deg, transparent 50%, var(--grey) 50%), linear-gradient(135deg, var(--grey) 50%, transparent 50%); background-position: calc(100% - 19px) calc(50% - 3px), calc(100% - 13px) calc(50% - 3px); background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
.form-grid textarea, .panel-form textarea, .report-editor textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .panel-form input:focus, .panel-form select:focus, .panel-form textarea:focus, .report-editor input:focus, .report-editor select:focus, .report-editor textarea:focus, .user-form input:focus, .user-form select:focus, .user-edit-grid input:focus, .user-edit-grid select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(222,83,7,.13); }
.form-grid select:disabled, .report-editor select:disabled { color: rgba(79,83,88,.55); background-color: #eef0f1; cursor: not-allowed; }
.catalog-cluster { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; padding: 18px; border: 1px solid rgba(79,83,88,.14); border-left: 5px solid var(--orange); border-radius: 16px; background: #f7f7f6; }
.spaced-top { margin-top: 20px; }

/* Navbar */
.admin-topbar { min-height: 72px; padding-block: 7px; }
.admin-brand { width: 190px; height: 46px; }
.admin-nav { gap: 7px; }
.admin-nav-link { min-width: 94px; }
.admin-nav > a.admin-nav-link { border: 1px solid transparent; }
.admin-nav > a.admin-nav-link:hover, .admin-nav > a.admin-nav-link.is-active { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.14); }
.nav-user { min-width: 175px; display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 9px; padding: 4px 10px; color: var(--white); }
.nav-user-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: var(--orange); font-weight: 900; }
.nav-user-copy { min-width: 0; display: grid; gap: 1px; }
.nav-user-copy strong, .nav-user-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-copy strong { font-size: 13px; }
.nav-user-copy small { color: rgba(255,255,255,.65); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.logout-link { min-width: 72px; }
.language-picker summary { min-width: 74px; }
.language-menu { color: var(--grey); }
.language-chevron, .chevron { display: none !important; }

/* Login redesign */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: clamp(18px,4vw,48px); background: radial-gradient(circle at 12% 18%, rgba(222,83,7,.16), transparent 26%), linear-gradient(135deg, #f1f2f2 0%, #e4e6e7 58%, #f8f8f7 100%); }
.login-shell { width: min(1120px,100%); min-height: 620px; display: block; overflow: hidden; border: 1px solid rgba(79,83,88,.16); border-radius: 28px; background: var(--white); box-shadow: 0 34px 90px rgba(79,83,88,.24); }
.login-stage { min-height: 620px; display: grid; grid-template-columns: 1.06fr .94fr; }
.login-brand-side { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(36px,5vw,70px); color: var(--white); background: var(--grey); isolation: isolate; }
.login-brand-side::before { content: ""; position: absolute; inset: 0; z-index: -2; opacity: .22; background-image: linear-gradient(rgba(255,255,255,.16) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,.16) 1px, transparent 1px); background-size: 48px 48px; }
.login-brand-side::after { content: ""; position: absolute; width: 420px; height: 420px; right: -170px; bottom: -180px; z-index: -1; border: 72px solid rgba(222,83,7,.85); border-radius: 50%; }
.login-brand-orbit { position: absolute; width: 250px; height: 250px; right: -90px; top: -90px; border: 2px solid rgba(255,255,255,.16); border-radius: 50%; }
.login-horizontal-logo { width: min(390px,88%); max-height: 94px; object-fit: contain; object-position: left center; }
.login-brand-copy { position: relative; z-index: 2; max-width: 560px; padding-top: 80px; }
.login-brand-copy > span { display: inline-block; margin-bottom: 15px; color: #f3a77c; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .17em; }
.login-brand-copy h1 { margin: 0; color: var(--white); font-size: clamp(42px,5vw,68px); line-height: .98; text-transform: uppercase; }
.login-brand-copy p { max-width: 430px; margin: 19px 0 0; color: rgba(255,255,255,.68); font-size: 15px; line-height: 1.65; }
.login-mark-watermark { position: absolute; width: 210px; right: 28px; bottom: 24px; opacity: .08; }
.login-form-side { display: flex; flex-direction: column; justify-content: center; padding: clamp(38px,6vw,76px); background: var(--white); }
.login-form-heading { margin-bottom: 28px; }
.login-form-heading h2 { margin: 5px 0 0; color: var(--grey); font-size: clamp(34px,4vw,48px); }
.login-form { display: grid; gap: 18px; }
.login-form label > span:first-child { color: var(--grey); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 52px !important; }
.password-toggle { position: absolute; right: 7px; top: 50%; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; color: var(--grey); background: transparent; }
.password-toggle:hover, .password-toggle.is-visible { color: var(--orange); background: rgba(222,83,7,.09); }
.password-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.password-toggle.is-visible svg circle { fill: currentColor; }
.login-form-meta { display: flex; justify-content: flex-end; margin-top: -4px; }
.login-form-meta a { color: var(--orange); font-size: 13px; font-weight: 900; text-decoration: none; }
.login-form-meta a:hover { text-decoration: underline; }
.login-submit { width: 100%; margin-top: 4px; }
.login-security-note { margin: 20px 0 0; color: var(--grey-mid); font-size: 11px; text-align: center; }

/* Dashboard cards, catalogue and chart */
.category-card { position: relative; overflow: hidden; border-width: 2px; text-align: left; }
.category-card::after { content: ""; position: absolute; inset: auto -35px -55px auto; width: 120px; height: 120px; border-radius: 50%; opacity: .08; background: currentColor; }
.category-card .category-icon { background: currentColor; }
.category-icon svg { width: 34px; height: 34px; fill: none; stroke: var(--white); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.category-food { color: var(--food); border-color: rgba(200,59,53,.25); }
.category-recycling { color: var(--recycling); border-color: rgba(47,134,84,.25); }
.category-seeds { color: var(--seeds); border-color: rgba(48,120,168,.25); }
.category-card-copy strong { color: currentColor; text-transform: none; }
.category-state { position: relative; width: 24px; height: 24px; }
.category-state::before, .category-state::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; background: currentColor; transform: translate(-50%,-50%); transition: transform .18s ease; }
.category-state::after { transform: translate(-50%,-50%) rotate(90deg); }
.category-card[aria-expanded="true"] .category-state::after { transform: translate(-50%,-50%) rotate(0); }
.category-panel-food > header { background: var(--food); }
.category-panel-recycling > header { background: var(--recycling); }
.category-panel-seeds > header { background: var(--seeds); }
.category-panel > header strong, .category-panel > header small { display: block; }
.category-panel > header small { margin-top: 4px; color: rgba(255,255,255,.72); }
.catalog-accordion-list { display: grid; gap: 8px; padding: 14px; }
.catalog-group-accordion { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fafafa; }
.catalog-group-accordion summary { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 44px 14px 16px; color: var(--grey); list-style: none; cursor: pointer; }
.catalog-group-accordion summary::-webkit-details-marker { display: none; }
.catalog-group-accordion summary::before, .catalog-group-accordion summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 12px; height: 2px; background: var(--grey); transform: translateY(-50%); }
.catalog-group-accordion summary::after { transform: translateY(-50%) rotate(90deg); }
.catalog-group-accordion[open] summary::after { display: none; }
.catalog-group-accordion summary span { font-weight: 900; }
.catalog-group-accordion summary small { color: var(--grey-mid); font-size: 11px; }
.catalog-products-panel { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; border-top: 1px solid var(--line); }
.catalog-products-panel button { min-height: 36px; margin-top: 12px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--grey); background: var(--white); font-weight: 800; }
.catalog-products-panel button:hover { color: var(--orange); border-color: var(--orange); }
.product-filter-chip { display: inline-flex; align-items: center; gap: 8px; }
.product-filter-chip strong { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: var(--grey); font-size: 10px; }
.chart-toolbar { align-items: flex-start !important; }
.chart-controls { display: flex; align-items: center; gap: 12px; }
.segmented-control, .chart-period-nav { display: flex; align-items: center; gap: 4px; }
.segmented-control { padding: 4px; border-radius: 11px; background: var(--grey-soft); }
.segmented-control button, .chart-nav { min-height: 38px; border: 0; border-radius: 8px; color: var(--grey); background: transparent; font-weight: 900; }
.segmented-control button { padding: 7px 12px; }
.segmented-control button.is-active { color: var(--white); background: var(--grey); }
.chart-nav { width: 38px; font-size: 23px; line-height: 1; }
.chart-nav:hover { color: var(--white); background: var(--orange); }
.activity-chart-card { overflow: hidden; }
.activity-chart-scroll { padding: 8px 4px 12px; }
.activity-chart { height: 255px; padding: 16px 12px 0; }
.activity-column { min-width: 0; display: grid; grid-template-rows: 22px 1fr 25px; align-items: end; justify-items: center; }
.activity-count { min-height: 20px; display: grid; place-items: center; color: var(--grey); font-size: 10px; font-weight: 900; }
.activity-bar-wrap { width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.activity-bar { width: min(18px,70%); min-height: 2px; border-radius: 6px 6px 2px 2px; background: var(--orange); }
.activity-column small { align-self: center; color: var(--grey-mid); font-size: 9px; }
.bar-row-food i { background: var(--food); }
.bar-row-recycling i { background: var(--recycling); }
.bar-row-seeds i { background: var(--seeds); }

/* Report table */
.report-table { min-width: 1440px; }
.report-row-active { box-shadow: inset 4px 0 #2f8654; }
.report-row-inactive { box-shadow: inset 4px 0 var(--orange); }
.report-code-stack { min-width: 145px; display: grid; gap: 9px; }
.copy-link { width: max-content; min-height: 33px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(222,83,7,.3); border-radius: 9px; color: var(--orange); background: rgba(222,83,7,.06); font-size: 11px; font-weight: 900; }
.copy-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.category-pill { font-weight: 900; }
.category-pill-food { color: var(--food); background: rgba(200,59,53,.1); }
.category-pill-recycling { color: var(--recycling); background: rgba(47,134,84,.1); }
.category-pill-seeds { color: var(--seeds); background: rgba(48,120,168,.1); }
.report-table td small { display: block; margin-top: 4px; color: var(--grey-mid); font-size: 11px; }
.table-actions { min-width: 196px; display: flex !important; align-items: center; justify-content: flex-start; gap: 8px; }
.table-actions form { margin: 0; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: var(--grey); background: var(--white); }
.icon-button:hover { color: var(--orange); border-color: var(--orange); }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-enable { color: var(--recycling); }
.icon-disable { color: var(--orange); }
.icon-danger { color: var(--food); }
.list-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.list-tools select { min-height: 42px; min-width: 160px; padding: 9px 35px 9px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--grey); background-color: var(--white); }

/* Editor */
.heading-public-link { display: flex; flex-wrap: wrap; gap: 7px; }
.heading-public-link span { color: var(--grey-mid); }
.editor-layout { grid-template-columns: 220px minmax(0,1fr); gap: 24px; }
.editor-sidebar { position: sticky; top: 95px; display: grid; gap: 7px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: var(--shadow-soft); }
.editor-sidebar a { display: grid; grid-template-columns: 29px 1fr; align-items: center; gap: 9px; padding: 10px; border-radius: 9px; color: var(--grey); text-decoration: none; font-size: 12px; font-weight: 900; }
.editor-sidebar a:hover { color: var(--orange); background: rgba(222,83,7,.08); }
.editor-sidebar a span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--white); background: var(--grey); font-size: 9px; }
.editor-card { scroll-margin-top: 95px; }
.form-section-title { align-items: flex-start; }
.form-section-title > span { flex: 0 0 43px; }
.form-section-title p { margin: 6px 0 0; color: var(--grey-mid); font-weight: 400; line-height: 1.5; }
.compact-check { width: max-content; flex-direction: row !important; align-items: center; gap: 8px !important; margin: 17px 0 0 auto; color: var(--grey-mid) !important; font-size: 12px !important; }
.compact-check input { width: 17px !important; min-height: 17px !important; accent-color: var(--orange); }
.date-field { position: relative; display: grid; grid-template-columns: 1fr 46px; }
.date-field > input[type="text"] { border-radius: 11px 0 0 11px; }
.date-field > button { border: 1px solid rgba(79,83,88,.28); border-left: 0; border-radius: 0 11px 11px 0; color: var(--white); background: var(--grey); }
.date-field > button:hover { background: var(--orange); }
.date-field svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.date-field > input[type="date"] { position: absolute; width: 1px; height: 1px; right: 24px; bottom: 0; opacity: 0; pointer-events: none; }
.asset-library-group summary { list-style: none; }
.asset-library-group summary::-webkit-details-marker { display: none; }
.asset-library-group summary b { position: relative; width: 20px; height: 20px; margin-left: auto; }
.asset-library-group summary b::before, .asset-library-group summary b::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: currentColor; transform: translate(-50%,-50%); }
.asset-library-group summary b::after { transform: translate(-50%,-50%) rotate(90deg); }
.asset-library-group[open] summary b::after { display: none; }
.machine-banner-preview { min-height: 150px; }
.machine-banner-preview img { max-height: 360px; object-fit: contain; }
.media-editor-grid { align-items: start; }
.upload-card { min-width: 0; }
.upload-card > small { display: block; margin: -2px 0 12px; color: var(--grey-mid); font-weight: 400; line-height: 1.45; }
.media-preview, .media-preview-grid { min-height: 160px; }
.media-preview figure, .media-preview-grid figure, .existing-media { position: relative; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #f5f6f6; }
.media-preview figure img, .media-preview-grid img, .existing-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.media-preview figcaption, .new-file-preview figcaption, .existing-media > strong { display: block; padding: 9px 10px; color: var(--grey); background: var(--white); font-size: 12px; font-weight: 900; }
.media-preview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.existing-media { display: flex !important; flex-direction: column !important; gap: 0 !important; }
.existing-media > span { padding: 8px 10px; color: var(--grey-mid); background: var(--white); font-size: 11px; }
.existing-media input { width: 15px !important; min-height: 15px !important; accent-color: var(--orange); }
.file-control { position: relative; overflow: hidden; min-height: 44px; display: inline-flex !important; flex-direction: row !important; align-items: center; justify-content: center; margin-top: 12px; padding: 10px 14px; border: 1px solid var(--grey); border-radius: 10px; color: var(--white) !important; background: var(--grey); cursor: pointer; }
.file-control:hover { background: var(--orange); border-color: var(--orange); }
.file-control input { position: absolute; inset: 0; min-height: 0 !important; opacity: 0; cursor: pointer; }
.upload-placeholder { min-height: 150px; display: grid; place-items: center; padding: 20px; border: 1px dashed rgba(79,83,88,.3); border-radius: 12px; color: var(--grey-mid); text-align: center; }
.mass-grid.pass-grid { grid-template-columns: minmax(92px,.72fr) minmax(92px,.72fr) minmax(125px,1fr) minmax(105px,.82fr) minmax(105px,.82fr) minmax(135px,1fr); min-width: 790px; gap: 8px; }
.mass-grid output { justify-content: flex-end; }
.pass-row input[type="number"]::-webkit-inner-spin-button, .pass-row input[type="number"]::-webkit-outer-spin-button, .mass-grid input::-webkit-inner-spin-button, .mass-grid input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.add-after-list { margin-top: 15px; }
.publication-settings { display: grid; gap: 12px; }
.autosave-state { display: inline-flex; align-items: center; gap: 8px; color: var(--grey-mid); font-size: 12px; font-weight: 800; }
.autosave-state i { width: 9px; height: 9px; border-radius: 50%; background: var(--grey-mid); }
.autosave-state.is-saving i { background: var(--orange); animation: autosave-pulse 1s infinite; }
.autosave-state.is-saved i { background: var(--recycling); }
.autosave-state.is-offline i { background: var(--food); }
.autosave-state.is-restored i { background: var(--seeds); }
@keyframes autosave-pulse { 50% { opacity: .3; transform: scale(.8); } }

/* Users */
.user-form .password-field, .user-edit-grid .password-field { display: block; }
.user-form .password-toggle, .user-edit-grid .password-toggle { top: 50%; }

@media (max-width: 1180px) {
    .admin-brand { width: 165px; }
    .nav-user { min-width: 140px; }
    .admin-nav-link { min-width: auto; }
    .report-table { min-width: 1380px; }
}
@media (max-width: 980px) {
    .login-stage { grid-template-columns: 1fr; }
    .login-brand-side { min-height: 330px; padding: 36px; }
    .login-brand-copy { padding-top: 55px; }
    .login-mark-watermark { width: 150px; }
    .editor-layout { grid-template-columns: 1fr; }
    .editor-sidebar { position: static; grid-template-columns: repeat(4,minmax(0,1fr)); }
    .editor-sidebar a { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .catalog-cluster { grid-template-columns: 1fr 1fr; }
    .catalog-cluster label:last-child { grid-column: 1 / -1; }
    .chart-toolbar, .chart-controls { align-items: stretch !important; }
    .chart-toolbar { flex-direction: column; }
    .report-list-heading { align-items: flex-start; flex-direction: column; }
    .list-tools { width: 100%; justify-content: flex-start; }
}
@media (max-width: 760px) {
    .admin-topbar { min-height: 65px; padding-inline: 14px; }
    .admin-brand { width: 145px; height: 39px; }
    .admin-nav { top: 65px; }
    .nav-user { min-width: 0; width: 100%; }
    .admin-main { width: min(100% - 28px,1480px); padding-top: 28px; }
    .login-body { padding: 10px; }
    .login-shell, .login-stage { min-height: 0; }
    .login-shell { border-radius: 20px; }
    .login-brand-side { min-height: 285px; padding: 27px; }
    .login-horizontal-logo { width: min(320px,90%); }
    .login-brand-copy { padding-top: 35px; }
    .login-brand-copy h1 { font-size: 37px; }
    .login-brand-copy p { display: none; }
    .login-form-side { padding: 32px 24px; }
    .catalog-cluster, .form-grid-2, .media-editor-grid { grid-template-columns: 1fr; }
    .catalog-cluster label:last-child { grid-column: auto; }
    .editor-sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .category-grid { grid-template-columns: 1fr; }
    .category-panel > header { align-items: flex-start; flex-direction: column; }
    .chart-controls { flex-wrap: wrap; justify-content: space-between; }
    .list-tools { display: grid; grid-template-columns: 1fr; }
    .list-tools > * { width: 100%; min-width: 0 !important; }
    .report-table { min-width: 0; }
    .report-table td { grid-template-columns: minmax(100px,32%) 1fr; }
    .table-actions { min-width: 0; padding-top: 12px !important; }
    .media-preview-grid { grid-template-columns: 1fr; }
    .sticky-save-bar { align-items: stretch; flex-direction: column; }
    .sticky-save-bar > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   3U Vision Test Reports legacy v2.4 base
   ========================================================= */
:root {
    --category-food: #b73732;
    --category-recycling: #246da8;
    --category-seeds: #378451;
    --surface-dark: #41454a;
    --surface-darker: #383c40;
}

h1, h2, h3, .report-code, .structure-tab, .field-title { font-family: Conthrax, Lato, sans-serif; font-weight: 500; }
body, input, select, textarea, button { color: var(--grey); }
.admin-body { background: #eceeed; }
.admin-main { width: min(1520px, calc(100% - 44px)); padding-top: 36px; }

/* Header */
.admin-topbar { min-height: 74px; padding: 8px clamp(18px, 4vw, 58px); color: var(--white); background: var(--grey); border-bottom: 0; box-shadow: 0 8px 28px rgba(79,83,88,.25); }
.admin-brand { width: 205px; height: 48px; }
.admin-brand img { object-position: left center; }
.admin-nav { gap: 9px; }
.admin-nav > a { min-height: 42px; padding-inline: 15px; color: rgba(255,255,255,.88); border: 1px solid transparent; }
.admin-nav > a:hover, .admin-nav > a.is-active { color: var(--white); border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.12); }
.admin-topbar .language-picker summary { color: var(--white); border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); }
.admin-topbar .language-picker[open] summary, .admin-topbar .language-picker summary:hover { color: var(--white); border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.15); }
.language-chevron { display: none; }
.language-picker summary::after, .category-browser-card > summary::after, .category-group-node > summary::after { content: "+"; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: currentColor; font-size: 16px; line-height: 1; font-weight: 900; }
.language-picker[open] summary::after, .category-browser-card[open] > summary::after, .category-group-node[open] > summary::after { content: "−"; }
.nav-user { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 9px; padding: 4px 10px 4px 8px; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; }
.nav-user-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--white); background: var(--orange); font-weight: 900; }
.nav-user-copy { min-width: 0; display: grid; gap: 1px; }
.nav-user strong { color: var(--white); }
.nav-user small { color: rgba(255,255,255,.72); }
.logout-link { color: var(--white) !important; border-color: rgba(255,255,255,.24) !important; }
.logout-link:hover { background: var(--orange) !important; border-color: var(--orange) !important; }

/* Fixed toast notifications: no layout shift. */
.toast-stack { position: fixed; z-index: 1500; top: 88px; right: clamp(14px, 3vw, 42px); width: min(430px, calc(100vw - 28px)); display: grid; gap: 10px; pointer-events: none; }
.toast-stack .flash { margin: 0; pointer-events: auto; border-left-width: 5px; box-shadow: 0 18px 48px rgba(79,83,88,.26); }
.flash.is-hiding { max-height: 120px; margin: 0; padding: 14px 17px; opacity: 0; transform: translateY(-12px) scale(.98); }

/* Minimal dark login */
.login-body { min-height: 100svh; padding: clamp(18px,4vw,52px); display: grid; place-items: center; background: linear-gradient(145deg, var(--surface-darker), var(--grey)); }
.login-shell { width: min(1020px, 100%); }
.login-stage { overflow: hidden; display: grid; grid-template-columns: .92fr 1.08fr; min-height: 520px; border: 1px solid rgba(255,255,255,.17); border-radius: 26px; background: var(--white); box-shadow: 0 30px 80px rgba(63,67,72,.42); }
.login-brand-side { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 34px; padding: clamp(34px,6vw,62px); color: var(--white); background: var(--grey); }
.login-horizontal-logo { width: min(390px,100%); max-height: 116px; object-fit: contain; object-position: left center; }
.login-brand-copy span { display: block; margin-bottom: 10px; color: rgba(255,255,255,.72); font-size: 12px; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.login-brand-copy h1 { max-width: 390px; margin: 0; color: var(--white); font-size: clamp(30px,4vw,48px); line-height: 1.12; letter-spacing: -.02em; }
.login-form-side { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px,7vw,76px); background: var(--white); }
.login-form-heading { margin-bottom: 28px; }
.login-form-heading h2 { margin: 0; color: var(--grey); font-size: clamp(34px,5vw,50px); }
.login-form { display: grid; gap: 19px; }
.login-form label { display: grid; gap: 8px; color: var(--grey); font-size: 13px; font-weight: 900; }
.login-form input { width: 100%; height: 52px; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--grey); background: #f7f8f7; outline: 0; }
.login-form input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(222,83,7,.11); background: var(--white); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 58px; }
.password-toggle-icon { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; color: var(--grey); background: transparent; }
.password-toggle-icon:hover, .password-toggle-icon.is-visible { color: var(--orange); background: rgba(222,83,7,.08); }
.password-toggle-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.login-form-meta { display: flex; justify-content: flex-end; margin-top: -4px; }
.login-form-meta a { color: var(--orange); font-size: 13px; font-weight: 900; text-decoration: none; }
.login-submit { width: 100%; margin-top: 2px; }
.login-security-note { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--grey-mid); font-size: 12px; line-height: 1.5; }
.login-inline-error { margin-bottom: 18px; }

/* Titles and common controls */
.admin-heading h1, .section-heading h2, .starter-title h2, .form-section-title h2 { color: var(--grey); letter-spacing: -.02em; }
.dashboard-heading { align-items: center; }
.dashboard-heading h1 { font-size: clamp(35px,4.5vw,58px); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: clamp(24px,2.7vw,34px); }
.section-heading p { margin: 8px 0 0; color: var(--grey-mid); }
.dashboard-section { margin-top: 36px; }

select { appearance: none; padding-right: 46px !important; background-color: var(--white) !important; background-image: linear-gradient(45deg,transparent 50%,var(--grey) 50%),linear-gradient(135deg,var(--grey) 50%,transparent 50%),linear-gradient(to right,var(--line),var(--line)) !important; background-position: calc(100% - 20px) calc(50% - 3px),calc(100% - 14px) calc(50% - 3px),calc(100% - 40px) 50% !important; background-size: 6px 6px,6px 6px,1px 55% !important; background-repeat: no-repeat !important; }
select:focus { background-image: linear-gradient(45deg,transparent 50%,var(--orange) 50%),linear-gradient(135deg,var(--orange) 50%,transparent 50%),linear-gradient(to right,var(--line),var(--line)) !important; }
input, select, textarea { border: 1px solid var(--line); border-radius: 12px; color: var(--grey); background: var(--white); outline: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(222,83,7,.1); }
.field-label { min-height: 22px; display: flex; align-items: baseline; gap: 5px; color: var(--grey); font-size: 13px; font-weight: 900; }
.field-label small { margin-left: auto; color: var(--grey-mid); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.required-mark { display: inline; color: var(--orange); line-height: 1; }

/* Dashboard */
.stats-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.stat-card { min-height: 145px; }
.stat-disabled { border-top: 5px solid var(--orange); }
.stat-disabled strong { color: var(--orange); }
.category-browser-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.category-browser-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow-soft); }
.category-browser-card > summary { min-height: 122px; display: grid; grid-template-columns: 58px 1fr 22px; align-items: center; gap: 16px; padding: 22px; list-style: none; cursor: pointer; }
.category-browser-card > summary::-webkit-details-marker, .category-group-node > summary::-webkit-details-marker { display: none; }
.category-browser-card > summary > i, .category-group-node > summary > i { display: none; }
.category-browser-card > summary strong { display: block; color: var(--grey); font-family: Conthrax,Lato,sans-serif; font-size: 20px; }
.category-browser-card > summary small { display: block; margin-top: 7px; color: var(--grey-mid); }
.category-symbol { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; color: var(--white); font-size: 28px; font-weight: 900; }
.cat-food .category-symbol, .category-pill.cat-food { background: var(--category-food); }
.cat-recycling .category-symbol, .category-pill.cat-recycling { background: var(--category-recycling); }
.cat-seeds .category-symbol, .category-pill.cat-seeds { background: var(--category-seeds); }
.category-browser-card.cat-food { border-top: 5px solid var(--category-food); }
.category-browser-card.cat-recycling { border-top: 5px solid var(--category-recycling); }
.category-browser-card.cat-seeds { border-top: 5px solid var(--category-seeds); }
.category-tree { display: grid; gap: 8px; padding: 0 14px 14px; border-top: 1px solid var(--line); }
.category-group-node { border-bottom: 1px solid var(--line); }
.category-group-node:last-child { border-bottom: 0; }
.category-group-node > summary { display: grid; grid-template-columns: 1fr auto 20px; align-items: center; gap: 10px; min-height: 48px; padding: 8px 4px; list-style: none; cursor: pointer; font-weight: 900; }
.category-group-node > summary small { color: var(--grey-mid); font-size: 11px; font-weight: 700; }
.category-products { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 0 13px; }
.category-products button { padding: 8px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--grey); background: var(--white); font-size: 12px; font-weight: 700; }
.category-products button:hover { color: var(--orange); border-color: rgba(222,83,7,.5); background: rgba(222,83,7,.06); }
.analytics-grid { grid-template-columns: 2fr 1fr 1fr; }
.chart-card-wide { grid-column: auto; }
.chart-card { min-height: 315px; }
.chart-card header > div:first-child { display: grid; gap: 4px; }
.chart-card header strong { color: var(--grey); font-size: 16px; }
.chart-card header small { color: var(--grey-mid); }
.chart-controls select { min-height: 39px; padding-block: 6px; }
.icon-button { width: 39px; height: 39px; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--grey); background: var(--white); font-weight: 900; }
.chart-canvas-wrap { position: relative; min-height: 250px; }
.chart-canvas-wrap canvas { display: block; max-width: 100%; }
.chart-canvas-wrap .chart-empty { position: absolute; inset: 48px 0 0; background: rgba(255,255,255,.92); }
.metric-list { display: grid; gap: 10px; }
.metric-list > div { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #f4f5f4; }
.metric-list > div > span:not(.category-pill) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 6px 10px; border-radius: 99px; color: var(--white); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.report-toolbar { display: grid; grid-template-columns: minmax(260px,1fr) repeat(3,minmax(170px,.45fr)); gap: 10px; margin-bottom: 12px; }
.report-toolbar select { min-height: 46px; }
.search-control { position: relative; display: block; }
.search-control svg { position: absolute; z-index: 1; left: 15px; top: 50%; transform: translateY(-50%); width: 21px; height: 21px; fill: none; stroke: var(--grey-mid); stroke-width: 1.7; }
.search-control input { width: 100%; height: 46px; padding: 0 14px 0 46px; }
.search-control::before, .search-control::after { content: none !important; display: none !important; }
.report-table-wrap { overflow-x: auto; }
.report-table { width: 100%; min-width: 1120px; border-collapse: collapse; table-layout: fixed; }
.report-table th { padding: 13px 14px; color: var(--grey-mid); background: #f4f5f4; text-align: left; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.report-table th:nth-child(1) { width: 16%; }.report-table th:nth-child(2){width:20%;}.report-table th:nth-child(3){width:10%;}.report-table th:nth-child(4){width:10%;}.report-table th:nth-child(5){width:10%;}.report-table th:nth-child(6){width:20%;}.report-table th:nth-child(7){width:14%;}
.report-table td { padding: 15px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.report-table td > strong, .report-table td > small { display: block; }
.report-table td > small { margin-top: 5px; color: var(--grey-mid); line-height: 1.35; }
.report-code { color: var(--grey); font-size: 14px; }
.copy-link-button { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--orange); background: var(--white); font-size: 10px; font-weight: 900; }
.copy-link-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.status-pill { display: inline-flex; min-height: 28px; align-items: center; padding: 5px 9px; border-radius: 99px; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.status-active { color: #267343; background: #e4f2e9; }
.status-disabled { color: #a94513; background: #fff0e7; }
.audit-cell strong { font-size: 12px; }.audit-cell small { font-size: 11px; }
.row-actions { display: flex; align-items: center; justify-content: flex-start; gap: 7px; }
.row-actions form { margin: 0; }
.action-button { width: 35px; height: 35px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: var(--grey); background: var(--white); text-decoration: none; font-size: 16px; font-weight: 900; }
.action-button:hover { color: var(--orange); border-color: rgba(222,83,7,.45); background: rgba(222,83,7,.06); }
.action-open { color: var(--white); border-color: var(--grey); background: var(--grey); }
.action-delete { color: #a33e35; }

/* New report */
.starter-shell { display: grid; place-items: center; }
.starter-card { width: min(1040px,100%); padding: clamp(25px,4vw,46px); border: 1px solid var(--line); border-radius: 24px; background: var(--white); box-shadow: var(--shadow); }
.starter-title { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 28px; }
.starter-title > span, .form-section-title > span { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: var(--white); background: var(--orange); font-weight: 900; }
.starter-title h2, .form-section-title h2 { margin: 0; font-size: 23px; }
.starter-title p, .form-section-title p { margin: 6px 0 0; color: var(--grey-mid); line-height: 1.5; }
.starter-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 30px; }
.form-error-summary { margin-bottom: 20px; padding: 14px; border-left: 5px solid var(--orange); border-radius: 10px; background: #fff3eb; }
.form-error-summary p { margin: 0; }
.field-error { color: #a33e35 !important; }

/* Sample/test hierarchy */
.structure-manager { margin-bottom: 22px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow-soft); }
.structure-manager > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.structure-manager h2 { margin: 0; color: var(--grey); font-size: 23px; }
.structure-manager p { margin: 7px 0 0; color: var(--grey-mid); }
.structure-count { padding: 8px 11px; border-radius: 99px; color: var(--grey); background: #f1f2f1; font-size: 12px; font-weight: 900; white-space: nowrap; }
.structure-row { display: grid; grid-template-columns: 90px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.structure-label { color: var(--grey-mid); font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.structure-tabs { min-width: 0; display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.structure-tab { min-height: 44px; display: inline-flex; flex-direction: column; justify-content: center; padding: 8px 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--grey); background: var(--white); text-decoration: none; font-size: 12px; }
.structure-tab small { margin-top: 3px; color: var(--grey-mid); font-family: Lato,sans-serif; font-size: 10px; }
.structure-tab.is-active { color: var(--white); border-color: var(--orange); background: var(--orange); }
.structure-tab.is-active small { color: rgba(255,255,255,.78); }
.structure-tabs form { display: flex; margin: 0; }
.structure-add, .structure-delete { min-height: 44px; padding: 8px 13px; border: 1px dashed rgba(222,83,7,.5); border-radius: 11px; color: var(--orange); background: rgba(222,83,7,.04); font-weight: 900; }
.structure-delete { min-height: 38px; color: #9c423a; border-color: rgba(156,66,58,.28); background: #fff7f5; font-size: 11px; }

/* Editor */
.report-editor { color: var(--grey); }
.editor-layout { grid-template-columns: 225px minmax(0,1fr); gap: 21px; }
.editor-sidebar { top: 96px; padding: 10px; border: 1px solid var(--line); border-radius: 17px; background: var(--white); box-shadow: var(--shadow-soft); }
.editor-sidebar a { min-height: 48px; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 10px; color: var(--grey-mid); text-decoration: none; font-size: 12px; font-weight: 900; }
.editor-sidebar a span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--grey); background: #eceeed; font-size: 10px; }
.editor-sidebar a:hover { color: var(--orange); background: rgba(222,83,7,.06); }
.editor-sidebar a.is-complete { color: var(--orange); }
.editor-sidebar a.is-complete span { color: var(--white); background: var(--orange); }
.editor-content { min-width: 0; display: grid; gap: 18px; }
.editor-card { padding: clamp(22px,3.5vw,38px); border: 1px solid var(--line); border-radius: 21px; background: var(--white); box-shadow: var(--shadow-soft); }
.form-section-title { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 27px; }
.form-section-title.with-action { display: grid; grid-template-columns: 43px 1fr auto; }
.form-grid { display: grid; gap: 18px; }
.form-grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.form-grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.form-grid label, .catalog-cluster label, .starter-card label { min-width: 0; display: grid; align-content: start; gap: 8px; }
.form-grid input, .form-grid select, .form-grid textarea, .catalog-cluster input, .catalog-cluster select, .starter-card input, .starter-card select { width: 100%; min-height: 48px; padding: 11px 13px; }
textarea { resize: vertical; min-height: 110px !important; line-height: 1.5; }
.catalog-cluster { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #f4f5f4; }
.identity-grid { align-items: start; }
.form-span-2 { grid-column: span 2; }
.presence-field { min-height: 73px; align-self: end; display: flex !important; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f4f5f4; }
.presence-field strong, .presence-field small { display: block; }.presence-field small { margin-top: 3px; color: var(--grey-mid); font-size: 10px; }
.switch { position: relative; width: 46px; height: 25px; flex: 0 0 auto; display: inline-block; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #b9bdc0; transition: .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 6px rgba(79,83,88,.25); transition: .2s; }
.switch input:checked + i { background: var(--orange); }.switch input:checked + i::after { transform: translateX(21px); }
.date-field { position: relative; display: block; }
.date-field input[data-date-display] { padding-right: 54px; }
.date-field button { position: absolute; top: 5px; right: 5px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; color: var(--grey); background: #eceeed; }
.date-field button:hover { color: var(--white); background: var(--orange); }
.date-field button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.date-field input[type=date] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.url-preview { overflow: hidden; text-overflow: ellipsis; color: var(--orange) !important; white-space: nowrap; }

.machine-banner-preview { min-height: 190px; display: grid; place-items: center; overflow: hidden; margin-bottom: 26px; border: 1px solid var(--line); border-radius: 16px; background: #f4f5f4; }
.machine-banner-preview img { width: 100%; max-height: 310px; object-fit: contain; }
.banner-placeholder { padding: 25px; color: var(--grey-mid); text-align: center; }
.sorting-library h3 { margin: 0 0 5px; }.sorting-library > p { margin: 0 0 20px; color: var(--grey-mid); }
.map-group + .map-group { margin-top: 24px; }.map-group h4 { margin: 0 0 11px; color: var(--grey); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; }
.map-library-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.map-option { position: relative; min-width: 0; display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); cursor: pointer; }
.map-option input { position: absolute !important; top: 10px; left: 10px; width: 18px !important; height: 18px !important; min-height: 0 !important; margin: 0; opacity: 0; }
.map-check { position: absolute; z-index: 2; top: 10px; left: 10px; width: 20px; height: 20px; border: 2px solid var(--grey-mid); border-radius: 6px; background: var(--white); }
.map-option input:checked + .map-check { border-color: var(--orange); background: var(--orange); box-shadow: inset 0 0 0 4px var(--white); }
.map-option:has(input:checked) { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(222,83,7,.09); }
.map-option img { width: 100%; height: 140px; object-fit: contain; border-radius: 9px; background: #f4f5f4; }
.map-option strong { overflow: hidden; color: var(--grey); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.dual-upload-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.upload-card { min-width: 0; padding: 16px; border: 1px dashed rgba(79,83,88,.36); border-radius: 16px; background: #f7f8f7; transition: .2s; }
.upload-card.is-dragging { border-color: var(--orange); background: rgba(222,83,7,.06); box-shadow: inset 0 0 0 3px rgba(222,83,7,.08); }
.upload-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.upload-card-head small { display: block; margin-top: 5px; color: var(--grey-mid); }
.file-control { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 13px; border: 1px solid var(--orange); border-radius: 10px; color: var(--white); background: var(--orange); font-weight: 900; cursor: pointer; }
.file-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.compact-file-control { flex: 0 0 auto; font-size: 12px; }
.media-preview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.existing-media, .new-media-preview { min-width: 0; overflow: hidden; display: grid; align-content: start; margin: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.existing-media img, .new-media-preview img { width: 100%; height: 126px; object-fit: cover; }
.existing-media strong, .new-media-preview figcaption { overflow: hidden; padding: 8px 9px 3px; color: var(--grey); font-size: 10px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.existing-media > span { padding: 3px 9px 8px; color: #9c423a; font-size: 10px; }
.existing-media > span input { width: 15px !important; height: 15px !important; min-height: 0 !important; }
.upload-placeholder { grid-column: 1/-1; min-height: 116px; display: grid; place-items: center; padding: 20px; border: 1px dashed var(--line); border-radius: 11px; color: var(--grey-mid); text-align: center; }

.pass-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.pass-card > header { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 10px 15px; color: var(--white); background: var(--grey); }
.remove-repeat { width: 31px; height: 31px; padding: 0; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; color: var(--white); background: transparent; font-size: 19px; }
.mass-table-scroll { overflow-x: auto; }
.mass-grid { min-width: 850px; display: grid; grid-template-columns: 1.12fr .8fr 1.12fr .9fr .9fr 1.13fr; align-items: stretch; }
.mass-grid > * { min-width: 0; min-height: 48px; display: flex; align-items: center; padding: 9px 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mass-grid > *:last-child { border-right: 0; }
.pass-grid-head > span { min-height: 39px; color: var(--grey-mid); background: #eceeed; font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.pass-row input { width: 100%; min-height: 37px; padding: 7px 8px; border-radius: 8px; background: rgba(255,255,255,.86); font-size: 13px; font-weight: 700; }
.pass-row output { color: inherit; font-size: 13px; font-weight: 900; }
.pass-row-input { color: var(--grey); background: #e4e6e7; }
.pass-row-accepted { color: #267343; background: #e8f3ec; }
.pass-row-rejected { color: #a83e37; background: #f8e8e6; }
.throughput-input { position: relative; gap: 5px; }.throughput-input input { min-width: 0; }.throughput-input small { flex: 0 0 auto; font-size: 10px; }
.mass-balance-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 15px; color: var(--grey); background: #f4f5f4; font-size: 11px; }
.mass-balance-status.is-ok { border-left: 5px solid #378451; }.mass-balance-status.is-warning { border-left: 5px solid var(--orange); }
.repeat-list { display: grid; gap: 14px; }.add-after-list { margin-top: 14px; }
.analysis-card { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #f7f8f7; }
.analysis-card > header { display: flex; gap: 10px; }.analysis-card .remove-repeat { color: var(--grey); border-color: var(--line); }
.analysis-title-fields { flex: 1; display: grid; grid-template-columns: 90px 1fr; gap: 9px; }
.analysis-row { display: grid; grid-template-columns: 1fr .8fr .65fr 1.5fr 34px; gap: 8px; margin-top: 9px; }
.analysis-row input, .analysis-title-fields input { min-height: 40px; padding: 8px 10px; }
.analysis-row button { border: 0; border-radius: 8px; color: #9c423a; background: #f3dedb; }
.inline-add { margin-top: 10px; padding: 7px 10px; border: 1px dashed var(--orange); border-radius: 8px; color: var(--orange); background: transparent; font-weight: 900; }
.final-content-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; align-items: stretch; }.final-content-grid > label { display: grid; grid-template-rows: auto 1fr; gap: 8px; }.final-content-grid textarea { height: 100%; min-height: 330px !important; }
.publication-settings-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.publication-toggle { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f4f5f4; }
.publication-toggle strong, .publication-toggle small { display: block; }.publication-toggle small { max-width: 420px; margin-top: 6px; color: var(--grey-mid); line-height: 1.4; }
.sticky-save-bar { position: sticky; z-index: 90; bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.96); box-shadow: 0 14px 38px rgba(79,83,88,.2); backdrop-filter: blur(12px); }
.sticky-save-bar > div:last-child { display: flex; gap: 9px; }.autosave-state { display: inline-flex; align-items: center; gap: 8px; color: var(--grey-mid); font-size: 12px; }.autosave-state i { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }

/* Responsive */
@media (max-width: 1250px) {
    .analytics-grid { grid-template-columns: 1fr 1fr; }.chart-card-wide { grid-column: 1/-1; }
    .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .report-toolbar { grid-template-columns: 1fr 1fr; }
    .map-library-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .identity-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 980px) {
    .admin-topbar { min-height: 68px; }.admin-brand { width: 176px; }
    .mobile-menu-toggle { display: grid; place-items: center; color: var(--white); border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); }
    .mobile-menu-toggle span { width: 20px; height: 2px; display: block; margin: 2px 0; background: currentColor; }
    .admin-nav { position: absolute; top: 68px; left: 14px; right: 14px; display: none; align-items: stretch; flex-direction: column; padding: 14px; border-radius: 15px; background: var(--grey); box-shadow: var(--shadow); }.admin-nav.is-open { display: flex; }
    .admin-nav > a { justify-content: flex-start; }.language-picker summary { justify-content: flex-start; }.language-menu { left: 0; right: auto; width: min(400px,calc(100vw - 56px)); }
    .nav-user { grid-template-columns: 34px 1fr; }
    .category-browser-grid { grid-template-columns: 1fr; }
    .editor-layout { grid-template-columns: 1fr; }.editor-sidebar { position: static; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }.editor-sidebar a { grid-template-columns: 31px 1fr; }
    .dual-upload-grid, .final-content-grid { grid-template-columns: 1fr; }
    .map-library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .login-stage { grid-template-columns: 1fr; }.login-brand-side { min-height: 245px; }.login-horizontal-logo { width: 330px; }
}
@media (max-width: 720px) {
    .admin-main { width: min(100% - 24px,1520px); padding-top: 24px; }.admin-heading { align-items: stretch; flex-direction: column; }.admin-heading .button { width: 100%; }
    .stats-grid, .analytics-grid, .form-grid-2, .form-grid-3, .catalog-cluster, .publication-settings-row, .report-toolbar { grid-template-columns: 1fr; }
    .form-span-2 { grid-column: auto; }.identity-grid { grid-template-columns: 1fr; }
    .editor-sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); }.editor-sidebar a { font-size: 10px; }
    .structure-manager > header { flex-direction: column; }.structure-row { grid-template-columns: 1fr; }.structure-delete { justify-self: start; }
    .map-library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.map-option img { height: 110px; }
    .media-preview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .upload-card-head { flex-direction: column; }.file-control { width: 100%; }
    .form-section-title.with-action { grid-template-columns: 43px 1fr; }.form-section-title.with-action > .button { grid-column: 1/-1; }
    .mass-balance-status { align-items: flex-start; flex-direction: column; }
    .analysis-row { grid-template-columns: 1fr 1fr; }.analysis-row button { min-height: 38px; }.analysis-title-fields { grid-template-columns: 70px 1fr; }
    .sticky-save-bar { align-items: stretch; flex-direction: column; }.sticky-save-bar > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
    .login-body { padding: 12px; }.login-stage { border-radius: 20px; }.login-brand-side, .login-form-side { padding: 28px; }.login-brand-side { min-height: 210px; }.login-brand-copy h1 { font-size: 32px; }
    .toast-stack { top: 78px; right: 12px; width: calc(100vw - 24px); }
}
@media (max-width: 480px) {
    .admin-brand { width: 145px; }.admin-topbar { padding-inline: 12px; }
    .editor-sidebar { grid-template-columns: 1fr; }.editor-sidebar a { min-height: 42px; }
    .media-preview-grid, .map-library-grid { grid-template-columns: 1fr; }
    .starter-actions { display: grid; grid-template-columns: 1fr; }
}

/* Legacy category pictogram rules (overridden by v2.5). */
.category-symbol svg {
    width: 32px;
    height: 32px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Legacy visual refinements (overridden by v2.5). */
.login-body {
    background: var(--surface-darker);
}
.login-stage {
    border-color: rgba(255,255,255,.2);
    background: #f4f5f4;
}
.login-brand-side {
    justify-content: space-between;
    background: var(--grey);
}
.login-brand-side::before,
.login-brand-side::after {
    content: none !important;
    display: none !important;
}
.login-brand-side {
    border-top: 7px solid var(--orange);
}
.login-horizontal-logo {
    width: min(360px,100%);
    max-height: 100px;
}
.login-brand-copy {
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,.2);
}
.login-brand-copy h1 {
    max-width: 350px;
    font-size: clamp(29px,3.6vw,43px);
}
.login-form-side {
    background: #f4f5f4;
}
.login-form input {
    background: var(--white);
}
@media (max-width: 980px) {
    .login-brand-side { min-height: 225px; }
}
@media (max-width: 720px) {
    .login-brand-side { min-height: 205px; }
    .login-brand-copy { padding-top: 20px; }
}

@media (max-width: 720px) {
    .report-table tbody tr {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: var(--white);
        overflow: hidden;
    }
    .report-table td {
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(105px, .42fr) minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        padding: 12px 14px;
        border-bottom: 1px solid var(--line);
    }
    .report-table td:last-child { border-bottom: 0; }
    .report-table td::before {
        content: attr(data-label);
        display: block;
        color: var(--grey-mid);
        font-size: 9px;
        font-weight: 900;
        letter-spacing: .07em;
        line-height: 1.35;
        text-transform: uppercase;
    }
    .report-table td > * { min-width: 0; }
    .report-table .row-actions { flex-wrap: wrap; }
    .report-table .copy-link-button { margin-top: 7px; }
}
@media (max-width: 720px) {
    .report-table-wrap { overflow: visible; }
    .report-table { min-width: 0 !important; table-layout: auto; }
    .report-table tbody { width: 100%; padding: 8px 0; }
    .report-table tbody tr { width: 100%; }
}
@media (max-width: 720px) {
    .sticky-save-bar { position: static; margin-top: 18px; }
}

/* =========================================================
   3U Vision Test Reports v2.5 refinements
   ========================================================= */

/* Login: simplified v2.3 structure, without decorative geometry. */
.login-v25 { background: var(--surface-darker); }
.login-shell-v25 { width: min(1040px,100%); min-height: 0; }
.login-stage-v25 { min-height: 570px; grid-template-columns: 1.02fr .98fr; border: 1px solid rgba(255,255,255,.14); border-radius: 24px; background: var(--white); box-shadow: 0 30px 75px rgba(63,67,72,.38); }
.login-brand-side-v25 { justify-content: space-between; gap: 60px; padding: clamp(38px,6vw,66px); border: 0 !important; background: var(--grey); }
.login-brand-side-v25::before, .login-brand-side-v25::after { content: none !important; display: none !important; }
.login-brand-side-v25 .login-horizontal-logo { width: min(390px,100%); max-height: 105px; }
.login-brand-copy-v25 { max-width: 430px; padding: 0; border: 0; }
.login-brand-copy-v25 > span { margin-bottom: 13px; color: #f0a071; }
.login-brand-copy-v25 h1 { max-width: 430px; margin: 0; color: var(--white); font-size: clamp(34px,4.7vw,56px); line-height: 1.04; }
.login-form-side-v25 { padding: clamp(38px,6vw,68px); background: #f5f6f5; }
.login-form-side-v25 .login-form-heading { margin-bottom: 28px; }
.login-form-side-v25 .login-form-heading h2 { margin: 5px 0 0; font-size: clamp(36px,4.8vw,50px); }
.login-form-side-v25 .eyebrow { color: var(--orange); }
.login-form-side-v25 .login-form input { height: 52px; background: var(--white); }
.login-form-side-v25 .password-toggle-icon { top: 50%; right: 7px; transform: translateY(-50%); }
.login-form-side-v25 .login-security-note { margin-top: 22px; padding-top: 0; border: 0; text-align: center; }

/* No +/- pseudo-icons. Use a rotating chevron only where a hierarchy opens. */
.language-picker summary::after,
.category-browser-card > summary::after,
.category-group-node > summary::after { content: none !important; display: none !important; }
.tree-chevron { width: 20px; height: 20px; display: grid; place-items: center; color: var(--grey-mid); transition: transform .24s ease, color .2s ease; }
.tree-chevron svg { width: 13px; height: 13px; display: block; fill: currentColor; }
.category-browser-card[open] > summary .tree-chevron,
.category-group-node[open] > summary .tree-chevron { transform: rotate(180deg); color: var(--orange); }
.category-browser-card > summary,
.category-group-node > summary { transition: background .2s ease, color .2s ease; }
.category-browser-card > summary:hover { background: #f7f8f7; }
.category-group-node > summary:hover { color: var(--orange); background: rgba(222,83,7,.05); }
.category-browser-card[open] .category-tree,
.category-group-node[open] .category-products { animation: categoryReveal .22s ease both; }
@keyframes categoryReveal { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* Official icon-library SVGs. */
.category-symbol svg { width: 31px; height: 31px; display: block; fill: currentColor !important; stroke: none !important; }
.category-symbol { color: var(--white); }

/* Dashboard statistics. */
.stats-grid-v25 { grid-template-columns: repeat(3,minmax(0,1fr)); }

/* Filter toolbar spacing and alignment. */
.report-toolbar { align-items: stretch; gap: 12px; margin-bottom: 16px; }
.report-toolbar > select,
.search-control { min-height: 48px; }
.report-toolbar > select { height: 48px; padding-top: 0 !important; padding-bottom: 0 !important; line-height: 48px; }
.search-control { display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.search-control svg { width: 18px; height: 18px; fill: var(--grey-mid); }
.search-control input { min-width: 0; height: 46px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none !important; }

/* Report table alignment and action icons. */
.report-table { table-layout: fixed; }
.report-table th, .report-table td { vertical-align: middle; }
.report-table th:nth-child(1) { width: 16%; }
.report-table th:nth-child(2) { width: 19%; }
.report-table th:nth-child(3) { width: 10%; }
.report-table th:nth-child(4) { width: 10%; }
.report-table th:nth-child(5) { width: 10%; }
.report-table th:nth-child(6) { width: 21%; }
.report-table th:nth-child(7) { width: 14%; }
.copy-link-button { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; margin-top: 9px; padding: 7px 10px; border: 1px solid rgba(222,83,7,.28); border-radius: 9px; color: var(--orange); background: rgba(222,83,7,.06); font-size: 11px; font-weight: 900; }
.copy-link-button svg { width: 14px; height: 14px; flex: 0 0 auto; fill: currentColor; }
.copy-link-button:hover { border-color: var(--orange); background: rgba(222,83,7,.11); }
.row-actions { min-width: 172px; display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
.row-actions form { display: flex; margin: 0; }
.action-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--grey); background: var(--white); }
.action-button svg { width: 17px; height: 17px; display: block; fill: currentColor; }
.action-button:hover { transform: translateY(-1px); color: var(--orange); border-color: rgba(222,83,7,.42); background: rgba(222,83,7,.06); }
.action-open { color: #246da8; }
.action-edit { color: var(--grey); }
.action-power.is-active { color: var(--orange); }
.action-power.is-disabled { color: #378451; }
.action-delete { color: #b73732; }
.action-delete:hover { color: #9f2f2b; border-color: rgba(183,55,50,.42); background: rgba(183,55,50,.07); }

@media (max-width: 1250px) {
    .stats-grid-v25 { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 980px) {
    .login-stage-v25 { grid-template-columns: 1fr; }
    .login-brand-side-v25 { min-height: 245px; gap: 32px; }
    .stats-grid-v25 { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 720px) {
    .login-brand-side-v25, .login-form-side-v25 { padding: 28px; }
    .login-brand-side-v25 { min-height: 215px; }
    .login-brand-copy-v25 h1 { font-size: 34px; }
    .stats-grid-v25 { grid-template-columns: 1fr; }
    .report-toolbar > select { line-height: normal; }
    .row-actions { min-width: 0; flex-wrap: wrap; }
}

/* =========================================================
   3U Vision Test Reports v2.6
   ========================================================= */

/* Language selector: flags and code only, never +/- controls. */
.language-picker summary::after,
.language-picker[open] summary::after { content: none !important; display: none !important; }
.language-picker summary { padding-inline: 13px !important; }

/* Login: one restrained three-dimensional card. */
.login-v26 {
    min-height: 100svh;
    padding: clamp(18px, 5vw, 64px);
    background:
        radial-gradient(circle at 50% 18%, rgba(255,255,255,.08), transparent 34%),
        linear-gradient(145deg, #45494e 0%, #4f5358 48%, #3f4348 100%);
}
.login-shell-v26 { width: min(610px, 100%); perspective: 1200px; }
.login-card-v26 {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 25px;
    background: linear-gradient(145deg, #f8f9f8 0%, #eceeed 100%);
    box-shadow:
        0 42px 90px rgba(38,41,44,.42),
        0 16px 34px rgba(38,41,44,.22),
        inset 0 1px 0 rgba(255,255,255,.8);
    transform: rotateX(.35deg);
}
.login-brand-v26 {
    min-height: 168px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: clamp(28px,6vw,46px);
    color: var(--white);
    background: linear-gradient(135deg, #4f5358 0%, #44484d 60%, #565b60 100%);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.12), inset 0 18px 30px rgba(255,255,255,.025);
}
.login-brand-v26 img { width: min(310px, 65%); max-height: 88px; object-fit: contain; object-position: left center; }
.login-brand-v26 > div { min-width: 145px; padding-left: 22px; border-left: 1px solid rgba(255,255,255,.2); }
.login-brand-v26 span, .login-brand-v26 strong { display: block; }
.login-brand-v26 span { color: rgba(255,255,255,.65); font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.login-brand-v26 strong { margin-top: 7px; color: var(--white); font-family: Conthrax,Lato,sans-serif; font-size: 14px; line-height: 1.35; font-weight: 500; }
.login-content-v26 { padding: clamp(30px,6vw,48px); }
.login-title-v26 { margin-bottom: 27px; }
.login-title-v26 h1 { margin: 0; color: var(--grey); font-size: clamp(38px,7vw,52px); line-height: 1; }
.login-title-v26 p { margin: 12px 0 0; color: var(--grey-mid); font-size: 13px; }
.login-form-v26 { gap: 18px; }
.login-form-v26 input { height: 53px; background: rgba(255,255,255,.88); box-shadow: inset 0 1px 3px rgba(79,83,88,.06); }
.password-field-v26 { height: 53px; }
.password-field-v26 input { height: 53px; }
.password-field-v26 .password-toggle-icon { top: 50% !important; right: 7px !important; transform: translateY(-50%) !important; }
.login-form-v26 .login-submit { min-height: 52px; margin-top: 3px; }

/* Dashboard sizing and category pictograms. */
.stats-grid-v25 { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
.category-symbol { color: var(--white) !important; background: rgba(255,255,255,.14) !important; border: 1px solid rgba(255,255,255,.24); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
.category-symbol svg { width: 40px !important; height: 40px !important; fill: none !important; stroke: currentColor !important; stroke-width: 2.8 !important; }
.category-browser-card.cat-food > summary { background: linear-gradient(135deg, rgba(183,55,50,.12), rgba(255,255,255,0) 65%); }
.category-browser-card.cat-recycling > summary { background: linear-gradient(135deg, rgba(36,109,168,.12), rgba(255,255,255,0) 65%); }
.category-browser-card.cat-seeds > summary { background: linear-gradient(135deg, rgba(55,132,81,.12), rgba(255,255,255,0) 65%); }
.category-browser-card.cat-food .category-symbol { background: var(--category-food) !important; }
.category-browser-card.cat-recycling .category-symbol { background: var(--category-recycling) !important; }
.category-browser-card.cat-seeds .category-symbol { background: var(--category-seeds) !important; }
.category-browser-card > summary::after,
.category-group-node > summary::after,
.category-browser-card[open] > summary::after,
.category-group-node[open] > summary::after { content: none !important; display: none !important; }

/* Standardized chart and list controls. */
.chart-controls { display: flex; align-items: center; gap: 8px; }
.chart-controls select,
.report-toolbar select {
    display: block;
    min-height: 48px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: normal !important;
    text-indent: 0;
}
.chart-controls select { min-width: 136px; height: 40px; min-height: 40px; }
.report-toolbar { align-items: stretch; gap: 12px; margin-bottom: 18px; }
.report-toolbar > select, .search-control { height: 48px; }
.search-control input { height: 46px; }

/* Eight-column report list with separate audit fields. */
.report-table { min-width: 1300px; }
.report-table th:nth-child(1) { width: 15%; }
.report-table th:nth-child(2) { width: 18%; }
.report-table th:nth-child(3) { width: 9%; }
.report-table th:nth-child(4) { width: 8%; }
.report-table th:nth-child(5) { width: 9%; }
.report-table th:nth-child(6) { width: 12%; }
.report-table th:nth-child(7) { width: 15%; }
.report-table th:nth-child(8) { width: 14%; }
.test-report-count { color: var(--grey); font-family: Conthrax,Lato,sans-serif; font-size: 18px; }
.copy-link-button { color: var(--orange) !important; background: rgba(222,83,7,.055) !important; }
.copy-link-button svg { fill: none !important; stroke: currentColor !important; stroke-width: 1.8 !important; }
.row-actions { min-width: 174px; gap: 7px; }
.action-button { width: 36px; height: 36px; border-radius: 9px; }
.action-button svg { width: 18px !important; height: 18px !important; fill: none !important; stroke: currentColor !important; stroke-width: 1.8 !important; stroke-linecap: round; stroke-linejoin: round; }
.action-open { color: #246da8; border-color: rgba(36,109,168,.24); background: rgba(36,109,168,.055); }
.action-edit { color: var(--grey); }
.action-power.is-active { color: #a94513; }
.action-power.is-disabled { color: #378451; }
.action-delete { color: #b73732; }

/* New report package creation. */
.package-create-grid { grid-template-columns: 1fr 1.25fr .65fr; }
.package-create-grid input[type="number"] { appearance: textfield; }
.package-create-grid input[type="number"]::-webkit-inner-spin-button,
.package-create-grid input[type="number"]::-webkit-outer-spin-button { opacity: 1; }

/* Package overview and test-report manager. */
.package-heading { align-items: center; }
.package-heading-actions .button svg, .button-icon-text svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.package-summary-grid { display: grid; grid-template-columns: 1.35fr repeat(3,minmax(0,1fr)); gap: 15px; }
.package-summary-card { min-height: 128px; display: flex; flex-direction: column; justify-content: center; padding: 21px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow-soft); }
.package-summary-card > span { color: var(--grey-mid); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.package-summary-card > strong:not(.category-pill):not(.status-pill) { display: block; margin-top: 9px; color: var(--grey); font-size: 22px; line-height: 1.2; }
.package-summary-card > small { display: block; margin-top: 8px; color: var(--grey-mid); line-height: 1.4; }
.package-summary-card .category-pill, .package-summary-card .status-pill { width: fit-content; margin-top: 10px; }
.package-summary-card .package-total { font-family: Conthrax,Lato,sans-serif; font-size: 38px !important; color: var(--orange) !important; }
.package-test-section { margin-top: 34px; }
.package-list-heading { align-items: center; }
.package-list-heading form { margin: 0; }
.package-test-list { display: grid; gap: 13px; }
.package-test-card { display: grid; grid-template-columns: 110px minmax(0,1fr) 190px; align-items: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow-soft); }
.package-test-number { display: grid; place-content: center; justify-items: center; gap: 8px; padding: 20px; color: var(--white); background: linear-gradient(145deg, var(--grey), var(--grey-deep)); }
.package-test-number span { font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.package-test-number strong { font-family: Conthrax,Lato,sans-serif; font-size: 31px; font-weight: 500; }
.package-test-copy { min-width: 0; padding: 20px 22px; }
.package-test-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.package-test-title-row h3 { margin: 7px 0 0; color: var(--grey); font-size: 20px; }
.package-sample-badge { display: inline-flex; padding: 5px 9px; border-radius: 99px; color: var(--orange); background: rgba(222,83,7,.09); font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.package-completion { min-width: 52px; display: inline-flex; align-items: center; justify-content: center; padding: 6px 9px; border-radius: 99px; font-size: 11px; font-weight: 900; }
.package-completion.is-ready { color: #267343; background: #e4f2e9; }
.package-completion.is-progress { color: #a94513; background: #fff0e7; }
.package-completion.is-empty { color: var(--grey-mid); background: #eceeed; }
.package-test-copy > p { margin: 10px 0; color: var(--grey); }
.package-test-copy > p.muted-copy { color: var(--grey-mid); font-style: italic; }
.package-test-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--grey-mid); font-size: 11px; }
.package-test-meta span { display: inline-flex; gap: 6px; }
.package-test-meta b { color: var(--grey); }
.package-progress { height: 5px; overflow: hidden; margin-top: 15px; border-radius: 99px; background: #e8e9ea; }
.package-progress i { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.package-test-actions { display: flex; flex-direction: column; justify-content: center; gap: 9px; padding: 18px; border-left: 1px solid var(--line); background: #f7f8f7; }
.package-test-actions .button { width: 100%; min-height: 41px; }
.package-test-actions form { margin: 0; }
.package-delete-button { width: 100%; min-height: 39px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(183,55,50,.22); border-radius: 10px; color: #b73732; background: rgba(183,55,50,.045); }
.package-delete-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.package-delete-button:hover { border-color: #b73732; background: rgba(183,55,50,.09); }

/* Flat package navigation inside the individual report editor. */
.test-package-navigator { display: grid; grid-template-columns: minmax(210px,.7fr) minmax(0,2fr) auto; align-items: center; gap: 18px; margin-bottom: 22px; padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow-soft); }
.package-nav-copy h2 { margin: 0; color: var(--grey); font-size: 18px; }
.package-nav-copy p { margin: 6px 0 0; color: var(--grey-mid); font-size: 12px; line-height: 1.45; }
.package-nav-tabs { min-width: 0; display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 5px; }
.package-nav-tab { min-width: 132px; display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--grey); background: #f7f8f7; text-decoration: none; }
.package-nav-tab > span { color: var(--grey-mid); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.package-nav-tab strong { overflow: hidden; font-family: Lato,sans-serif; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.package-nav-tab small { overflow: hidden; color: var(--grey-mid); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.package-nav-tab.is-active { color: var(--white); border-color: var(--orange); background: var(--orange); }
.package-nav-tab.is-active > span, .package-nav-tab.is-active small { color: rgba(255,255,255,.76); }

@media (max-width: 1120px) {
    .package-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .package-test-card { grid-template-columns: 92px minmax(0,1fr); }
    .package-test-actions { grid-column: 1 / -1; flex-direction: row; border-top: 1px solid var(--line); border-left: 0; }
    .package-test-actions .button, .package-test-actions form, .package-delete-button { width: auto; flex: 1; }
    .test-package-navigator { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .package-create-grid { grid-template-columns: 1fr; }
    .package-summary-grid { grid-template-columns: 1fr; }
    .package-test-card { grid-template-columns: 74px minmax(0,1fr); }
    .package-test-number { padding: 14px 10px; }
    .package-test-copy { padding: 17px; }
    .package-test-actions { display: grid; grid-template-columns: 1fr 1fr auto; }
    .package-test-actions .button { width: 100%; }
}
@media (max-width: 620px) {
    .login-brand-v26 { align-items: flex-start; flex-direction: column; }
    .login-brand-v26 img { width: min(330px,100%); }
    .login-brand-v26 > div { padding: 18px 0 0; border-top: 1px solid rgba(255,255,255,.2); border-left: 0; }
    .package-test-card { grid-template-columns: 1fr; }
    .package-test-number { grid-template-columns: auto auto; justify-content: flex-start; place-content: center start; }
    .package-test-actions { grid-template-columns: 1fr; }
    .package-test-actions form, .package-delete-button { width: 100%; }
}


/* =========================================================
   3U Vision Test Reports v2.7
   ========================================================= */

/* Horizontal login with controlled gradients and depth. */
.login-v27 {
    min-height: 100vh;
    padding: 0;
    place-items: stretch;
    display: grid;
    grid-template-rows: 1fr auto;
    color: var(--white);
    background:
        radial-gradient(circle at 14% 16%, rgba(222,83,7,.18), transparent 34%),
        radial-gradient(circle at 86% 78%, rgba(255,255,255,.08), transparent 31%),
        linear-gradient(135deg, #454a4f 0%, #4f5358 43%, #3f4348 100%);
    overflow-x: hidden;
}
.login-v27::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .22;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(135deg, rgba(0,0,0,.85), transparent 74%);
}
.login-shell-v27 { width: min(1120px, calc(100% - 48px)); margin: auto; padding: 58px 0 28px; position: relative; z-index: 1; }
.login-card-v27 {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1.18fr) minmax(390px,.82fr);
    min-height: 500px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.035));
    box-shadow: 0 38px 90px rgba(44,47,50,.36), 0 8px 22px rgba(44,47,50,.24), inset 0 1px 0 rgba(255,255,255,.18);
    backdrop-filter: blur(18px);
}
.login-card-v27::after { content: ""; position: absolute; inset: auto 0 0; height: 5px; background: linear-gradient(90deg, transparent, rgba(222,83,7,.75), transparent); pointer-events: none; }
.login-brand-panel-v27 { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: center; padding: clamp(42px,6vw,76px); overflow: hidden; background: linear-gradient(145deg, rgba(63,67,72,.96), rgba(79,83,88,.88)); }
.login-brand-panel-v27::before { content: "3U"; position: absolute; right: -25px; bottom: -66px; z-index: -1; color: rgba(255,255,255,.035); font-family: Conthrax,Lato,sans-serif; font-size: 250px; line-height: 1; letter-spacing: -.12em; }
.login-brand-glow { position: absolute; z-index: -1; width: 330px; height: 330px; left: -120px; top: -150px; border: 72px solid rgba(222,83,7,.18); border-radius: 50%; filter: blur(.2px); }
.login-brand-panel-v27 > img { width: min(440px,100%); max-height: 120px; object-fit: contain; object-position: left center; }
.login-brand-copy-v27 { max-width: 470px; margin-top: 44px; padding: 20px 22px; border-radius: 16px; background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.025)); box-shadow: inset 0 1px 0 rgba(255,255,255,.09); }
.login-brand-copy-v27 span, .login-brand-copy-v27 strong { display: block; }
.login-brand-copy-v27 span { color: rgba(255,255,255,.64); font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.login-brand-copy-v27 strong { margin-top: 8px; font-family: Conthrax,Lato,sans-serif; font-size: clamp(22px,3vw,34px); line-height: 1.08; }
.login-brand-copy-v27 p { max-width: 390px; margin: 17px 0 0; color: rgba(255,255,255,.66); font-size: 14px; line-height: 1.55; }
.login-form-panel-v27 { display: flex; flex-direction: column; justify-content: center; padding: clamp(38px,5vw,62px); color: var(--grey); background: linear-gradient(155deg, rgba(255,255,255,.98), rgba(242,243,243,.96)); }
.login-title-v27 > span { display: block; color: var(--orange); font-size: 10px; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.login-title-v27 h1 { margin: 8px 0 31px; color: var(--grey); font-family: Conthrax,Lato,sans-serif; font-size: clamp(36px,4.2vw,52px); line-height: 1; }
.login-form-v27 { display: grid; gap: 20px; }
.login-form-v27 label > span:first-child { display: block; margin-bottom: 8px; color: var(--grey); font-size: 12px; font-weight: 900; }
.login-form-v27 input { width: 100%; height: 50px; padding: 0 15px; border: 1px solid rgba(79,83,88,.22); border-radius: 12px; color: var(--grey); background: rgba(255,255,255,.82); outline: none; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.login-form-v27 input:focus { border-color: var(--orange); background: var(--white); box-shadow: 0 0 0 4px rgba(222,83,7,.10); }
.password-field-v27 { position: relative; display: block; }
.password-field-v27 input { padding-right: 52px; }
.password-field-v27 .password-toggle { position: absolute; top: 50%; right: 8px; width: 38px; height: 38px; display: grid; place-items: center; transform: translateY(-50%); border: 0; border-radius: 9px; color: var(--grey-mid); background: transparent; }
.password-field-v27 .password-toggle:hover { color: var(--orange); background: rgba(222,83,7,.08); }
.password-field-v27 .password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.login-form-v27 .login-form-meta { margin-top: -4px; }
.login-form-v27 .login-form-meta a { color: var(--grey-mid); font-size: 12px; font-weight: 800; text-decoration: none; }
.login-form-v27 .login-form-meta a:hover { color: var(--orange); }
.login-form-v27 .login-submit { width: 100%; margin-top: 2px; }
.login-footer-v27 { position: relative; z-index: 1; padding: 0 20px 24px; color: rgba(255,255,255,.47); font-size: 12px; text-align: center; letter-spacing: .01em; }
.login-footer-v27 span { color: rgba(222,83,7,.78); }

/* Slightly airier, less screen-filling admin layout. */
.admin-main { width: min(1370px, calc(100% - 72px)); padding-top: 34px; }
.admin-heading h1 { font-size: clamp(32px,3.5vw,50px); }
.dashboard-section { margin-top: 33px; }
.stats-grid { gap: 15px; margin-bottom: 34px; }
.stat-card { min-height: 140px; padding: 21px; }
.category-browser-grid { align-items: start; gap: 15px; }
.category-browser-card { align-self: start; width: 100%; }
.category-browser-card > summary { min-height: 108px; padding: 19px; }
.analytics-grid { gap: 15px; }
.chart-card { padding: 19px; }

/* No +/- glyphs in language or catalogue controls. */
.language-picker summary::after, .language-picker[open] summary::after,
.category-browser-card > summary::after, .category-browser-card[open] > summary::after,
.category-group-node > summary::after, .category-group-node[open] > summary::after { content: none !important; display: none !important; }
.category-browser-card > summary, .category-group-node > summary { grid-template-columns: 58px minmax(0,1fr) 22px; }
.category-group-node > summary { grid-template-columns: minmax(0,1fr) auto 22px; }
.tree-chevron { display: grid !important; place-items: center; transition: transform .22s ease; }
.category-browser-card[open] > summary .tree-chevron, .category-group-node[open] > summary .tree-chevron { transform: rotate(180deg); }

/* Stable branded native select controls. */
.report-toolbar select, .chart-controls select, .admin-form select, .form-grid select, select[data-catalog-category], select[data-catalog-group], select[data-catalog-product] {
    appearance: none;
    -webkit-appearance: none;
    height: 46px;
    min-height: 46px;
    margin: 0;
    padding: 0 42px 0 14px !important;
    border: 1px solid rgba(79,83,88,.22);
    border-radius: 11px;
    color: var(--grey);
    background-color: var(--white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234f5358' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    line-height: 1.2 !important;
    text-indent: 0 !important;
    box-shadow: 0 4px 13px rgba(79,83,88,.045);
}
.report-toolbar select:hover, .chart-controls select:hover, .admin-form select:hover, .form-grid select:hover { border-color: rgba(222,83,7,.48); }
.report-toolbar select:focus, .chart-controls select:focus, .admin-form select:focus, .form-grid select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(222,83,7,.09); }
.report-toolbar { grid-template-columns: minmax(260px,1.15fr) repeat(3,minmax(185px,.55fr)); align-items: center; }
.search-control { min-height: 46px; }
.search-control input { min-height: 44px; }

/* Report list v2.7: compact status, separate classification, combined audit. */
.report-table-v27 { min-width: 1460px; table-layout: fixed; }
.report-table-v27 th:nth-child(1) { width: 5%; }
.report-table-v27 th:nth-child(2) { width: 13%; }
.report-table-v27 th:nth-child(3) { width: 13%; }
.report-table-v27 th:nth-child(4) { width: 8%; }
.report-table-v27 th:nth-child(5) { width: 10%; }
.report-table-v27 th:nth-child(6) { width: 10%; }
.report-table-v27 th:nth-child(7) { width: 7%; }
.report-table-v27 th:nth-child(8) { width: 20%; }
.report-table-v27 th:nth-child(9) { width: 14%; }
.report-table-v27 th, .report-table-v27 td { padding: 14px 11px; }
.status-cell-v27 { text-align: center !important; }
.status-dot-v27 { display: inline-grid; justify-items: center; gap: 5px; color: var(--grey-mid); font-size: 9px; font-weight: 900; line-height: 1; text-transform: uppercase; }
.status-dot-v27 > span { width: 12px; height: 12px; border: 3px solid rgba(79,83,88,.12); border-radius: 50%; box-shadow: 0 0 0 3px rgba(79,83,88,.05); }
.status-dot-v27.is-active > span { border-color: #378451; background: #378451; box-shadow: 0 0 0 3px rgba(55,132,81,.12); }
.status-dot-v27.is-disabled > span { border-color: #b73732; background: #b73732; box-shadow: 0 0 0 3px rgba(183,55,50,.11); }
.audit-stack-v27 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.audit-stack-v27 > span { min-width: 0; padding-left: 10px; border-left: 2px solid var(--grey-light); }
.audit-stack-v27 > span:last-child { border-left-color: rgba(222,83,7,.38); }
.audit-stack-v27 small, .audit-stack-v27 strong, .audit-stack-v27 em { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-stack-v27 small { margin: 0 0 4px; color: var(--grey-mid); font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.audit-stack-v27 strong { color: var(--grey); font-size: 12px; }
.audit-stack-v27 em { margin-top: 4px; color: var(--grey-mid); font-size: 10px; font-style: normal; }

@media (max-width: 1050px) {
    .login-card-v27 { grid-template-columns: 1fr 390px; }
    .login-brand-panel-v27 { padding: 42px; }
    .admin-main { width: min(100% - 38px, 1370px); }
    .report-toolbar { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .login-v27 { display: block; min-height: 100vh; }
    .login-shell-v27 { width: min(100% - 28px, 620px); padding: 26px 0 18px; }
    .login-card-v27 { grid-template-columns: 1fr; min-height: 0; border-radius: 22px; }
    .login-brand-panel-v27 { min-height: 235px; padding: 32px; }
    .login-brand-panel-v27 > img { width: min(340px,100%); max-height: 88px; }
    .login-brand-copy-v27 { margin-top: 26px; }
    .login-brand-copy-v27 p { display: none; }
    .login-form-panel-v27 { padding: 31px 27px 34px; }
    .login-title-v27 h1 { margin-bottom: 24px; font-size: 38px; }
    .login-footer-v27 { padding-bottom: 20px; font-size: 11px; }
    .admin-main { width: min(100% - 24px, 1370px); padding-top: 26px; }
    .report-toolbar { grid-template-columns: 1fr; }
    .report-toolbar > select, .search-control { width: 100%; }
    .category-browser-grid { grid-template-columns: 1fr; }
    .audit-stack-v27 { grid-template-columns: 1fr; }
    .status-cell-v27 { text-align: left !important; }
    .status-dot-v27 { grid-template-columns: auto 1fr; align-items: center; justify-items: start; }
}
@media (max-width: 480px) {
    .login-brand-panel-v27 { padding: 27px 23px; }
    .login-form-panel-v27 { padding: 28px 22px 31px; }
    .login-brand-copy-v27 { padding-left: 15px; }
}

/* =========================================================
   3U Vision Test Reports v2.8
   ========================================================= */

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Clean language switcher: POST + cookie, with no query string in the URL. */
.language-menu { margin: 0; }
.language-menu button {
    min-width: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 25px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 0;
    border-radius: 10px;
    color: var(--grey);
    background: transparent;
    text-align: left;
    font-size: 13px;
}
.language-menu button:hover,
.language-menu button.is-current { color: var(--orange); background: rgba(222,83,7,.09); }
.language-menu button strong { font-size: 11px; letter-spacing: .08em; }
[dir="rtl"] .language-menu button { text-align: right; }

/* Login: animated branded gradients, subtle depth, no decorative clutter. */
.login-v27 {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(circle at 16% 18%, rgba(222,83,7,.29), transparent 34%),
        radial-gradient(circle at 82% 76%, rgba(255,255,255,.12), transparent 31%),
        linear-gradient(125deg, #3f4348 0%, #5c6167 42%, #4f5358 66%, #3f4348 100%);
    background-size: 150% 150%, 145% 145%, 170% 170%;
    animation: loginGradientDrift 16s ease-in-out infinite alternate;
}
.login-v27::before {
    opacity: .18;
    animation: loginGridDrift 22s linear infinite;
}
.login-v27::after {
    content: "";
    position: fixed;
    z-index: -1;
    width: 46vw;
    height: 46vw;
    min-width: 420px;
    min-height: 420px;
    right: -15vw;
    top: -20vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(222,83,7,.24), rgba(222,83,7,.07) 38%, transparent 68%);
    filter: blur(20px);
    pointer-events: none;
    animation: loginOrbMove 14s ease-in-out infinite alternate;
}
.login-card-v27 {
    border-color: rgba(255,255,255,.23);
    box-shadow:
        0 52px 120px rgba(44,47,50,.43),
        0 16px 38px rgba(44,47,50,.28),
        inset 0 1px 0 rgba(255,255,255,.24),
        inset 0 -1px 0 rgba(79,83,88,.18);
    transform: perspective(1400px) rotateX(.35deg);
}
.login-card-v27::before {
    content: "";
    position: absolute;
    z-index: 4;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, rgba(255,255,255,.16), transparent 23%, transparent 71%, rgba(222,83,7,.09));
    pointer-events: none;
}
.login-brand-panel-v27::before {
    content: "";
    width: 330px;
    height: 330px;
    right: -80px;
    bottom: -112px;
    background: url("../img/brand/logo-mark-light.svg") center / contain no-repeat;
    opacity: .055;
    letter-spacing: 0;
}
.login-brand-glow {
    border-width: 64px;
    border-color: rgba(222,83,7,.22);
    box-shadow: 0 0 90px rgba(222,83,7,.13);
    animation: loginGlowPulse 7s ease-in-out infinite alternate;
}
.login-form-panel-v27 {
    position: relative;
    background:
        radial-gradient(circle at 88% 6%, rgba(222,83,7,.08), transparent 27%),
        linear-gradient(155deg, rgba(255,255,255,.99), rgba(238,240,240,.97));
}
.login-title-v27 > span { letter-spacing: .15em; }
@keyframes loginGradientDrift {
    0% { background-position: 0% 20%, 100% 80%, 0% 50%; }
    100% { background-position: 24% 6%, 72% 100%, 100% 50%; }
}
@keyframes loginGridDrift { to { background-position: 54px 54px, 54px 54px; } }
@keyframes loginOrbMove { to { transform: translate(-11vw, 13vh) scale(1.12); } }
@keyframes loginGlowPulse { to { transform: scale(1.08); opacity: .82; } }
@media (prefers-reduced-motion: reduce) {
    .login-v27, .login-v27::before, .login-v27::after, .login-brand-glow { animation: none !important; }
}

/* Dashboard catalogue: SEEDS opens directly to the alphabetic product list. */
.category-products-direct {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 7px;
    padding: 14px;
}
.category-products-direct button:first-child { grid-column: 1 / -1; }

/* Dashboard filters: centered text, stable padding, no stray pseudo glyphs. */
.report-toolbar {
    grid-template-columns: minmax(230px,1.15fr) repeat(3,minmax(150px,.55fr));
    gap: 10px;
}
.report-toolbar > select,
.search-control {
    width: 100%;
    min-width: 0;
    height: 46px;
}
.report-toolbar > select {
    padding: 0 38px 0 13px !important;
    line-height: normal !important;
    background-position: right 12px center;
}
.search-control { position: relative; overflow: hidden; }
.search-control::before,
.search-control::after { content: none !important; display: none !important; }
.search-control svg { flex: 0 0 17px; width: 17px; height: 17px; fill: var(--grey-mid); }
.search-control input { min-width: 0; padding-left: 0; }

/* Report list: no horizontal scrollbar. It stays compact on desktop and becomes cards before tablet widths. */
.report-table-wrap { overflow: clip !important; }
.report-table-v27 {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed;
    font-size: 11px;
}
.report-table-v27 th,
.report-table-v27 td { padding: 11px 6px; overflow-wrap: anywhere; }
.report-table-v27 th:nth-child(1) { width: 3%; }
.report-table-v27 th:nth-child(2) { width: 13%; }
.report-table-v27 th:nth-child(3) { width: 11%; }
.report-table-v27 th:nth-child(4) { width: 8%; }
.report-table-v27 th:nth-child(5) { width: 10%; }
.report-table-v27 th:nth-child(6) { width: 9%; }
.report-table-v27 th:nth-child(7) { width: 6%; }
.report-table-v27 th:nth-child(8) { width: 24%; }
.report-table-v27 th:nth-child(9) { width: 16%; }
.status-cell-v27 { padding-inline: 2px !important; }
.status-dot-v27 { display: inline-grid; place-items: center; }
.status-dot-v27 > span { width: 10px; height: 10px; border-width: 2px; box-shadow: 0 0 0 3px rgba(79,83,88,.05); }
.report-customer-cell strong,
.report-table-v27 .report-code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-table-v27 .copy-link-button { min-height: 27px; margin-top: 5px; padding: 4px 6px; gap: 0; }
.report-table-v27 .copy-link-button span { display: none; }
.report-table-v27 .copy-link-button svg { width: 15px; height: 15px; }
.report-table-v27 .category-pill { max-width: 100%; padding-inline: 7px; font-size: 8px; }
.report-table-v27 .test-report-count { font-size: 20px; }
.audit-stack-v27 { gap: 7px; }
.audit-stack-v27 > span { padding-left: 7px; }
.audit-stack-v27 strong { font-size: 11px; }
.audit-stack-v27 em { font-size: 9px; }
.report-table-v27 .row-actions { gap: 5px; justify-content: flex-start; }
.report-table-v27 .action-button { width: 31px; height: 31px; }

/* New package starts with a single test, then uses duplication. */
.starter-single-test-note {
    margin: 18px 0 0;
    padding: 13px 15px;
    border-left: 3px solid var(--orange);
    border-radius: 10px;
    color: var(--grey-mid);
    background: rgba(222,83,7,.055);
    line-height: 1.5;
}

/* Package summary v2.8: identity, count and status. */
.package-summary-grid-v28 {
    grid-template-columns: minmax(0,1.85fr) minmax(190px,.55fr) minmax(230px,.7fr);
}
.package-identity-card-v28 { justify-content: flex-start; }
.package-identity-card-v28 > strong { margin-bottom: 16px; }
.package-identity-card-v28 dl {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 10px;
    margin: 0;
}
.package-identity-card-v28 dl > div {
    min-width: 0;
    padding: 10px;
    border-radius: 10px;
    background: var(--grey-soft);
}
.package-identity-card-v28 dt,
.package-identity-card-v28 dd { margin: 0; }
.package-identity-card-v28 dt { color: var(--grey-mid); font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.package-identity-card-v28 dd { margin-top: 5px; color: var(--grey); font-size: 12px; font-weight: 900; overflow-wrap: anywhere; }
.package-count-card-v28,
.package-status-card-v28 { text-align: center; align-items: center; }
.package-status-card-v28 form { width: 100%; margin-top: 14px; }
.package-status-card-v28 form .button { width: 100%; }
.package-test-card-v28 { grid-template-columns: 92px minmax(0,1fr) 202px; }
.package-test-card-v28 .package-test-meta { grid-template-columns: repeat(4,minmax(0,1fr)); }
.package-test-actions-v28 form { width: 100%; }
.package-test-actions-v28 .button { font-size: 12px; padding-inline: 10px; }
.package-test-actions-v28 .button-icon-text svg { flex: 0 0 17px; }
.internal-technical-button { border-color: rgba(79,83,88,.3); background: #f3f4f4; }
.duplicate-test-button { width: 100%; }

/* Internal technical report placeholder. */
.technical-report-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}
.technical-report-meta {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 1px;
    background: var(--line);
}
.technical-report-meta > div { min-width: 0; padding: 18px; background: var(--white); }
.technical-report-meta span,
.technical-report-meta strong { display: block; }
.technical-report-meta span { color: var(--grey-mid); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.technical-report-meta strong { margin-top: 6px; color: var(--grey); overflow-wrap: anywhere; }
.technical-report-placeholder {
    min-height: 430px;
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 55px 24px;
    text-align: center;
    background:
        radial-gradient(circle at center, rgba(222,83,7,.055), transparent 36%),
        linear-gradient(180deg, #fff, #f7f8f7);
}
.technical-report-placeholder img { width: 92px; height: 92px; object-fit: contain; opacity: .28; }
.technical-report-placeholder > span { margin-top: 22px; color: var(--orange); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.technical-report-placeholder h2 { max-width: 720px; margin: 12px 0 0; color: var(--grey); font-family: Conthrax,Lato,sans-serif; font-size: clamp(23px,3vw,34px); line-height: 1.25; }
.technical-report-placeholder p { max-width: 700px; margin: 16px 0 0; color: var(--grey-mid); line-height: 1.65; }

/* Progress navigation uses buttons, not hash links, so the address bar stays clean. */
.editor-sidebar button {
    width: 100%;
    min-height: 48px;
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border: 0;
    border-radius: 10px;
    color: var(--grey-mid);
    background: transparent;
    text-align: left;
    font-size: 12px;
    font-weight: 900;
}
.editor-sidebar button span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--grey); background: #eceeed; font-size: 10px; }
.editor-sidebar button:hover { color: var(--orange); background: rgba(222,83,7,.06); }
.editor-sidebar button.is-complete { color: var(--orange); }
.editor-sidebar button.is-complete span { color: var(--white); background: var(--orange); }

@media (max-width: 1180px) {
    .report-table-wrap { overflow: visible !important; border: 0; background: transparent; box-shadow: none; }
    .report-table-v27 thead { display: none; }
    .report-table-v27,
    .report-table-v27 tbody,
    .report-table-v27 tr,
    .report-table-v27 td { display: block; width: 100%; }
    .report-table-v27 tbody { display: grid; gap: 13px; padding: 0; }
    .report-table-v27 tr { padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); box-shadow: var(--shadow-soft); }
    .report-table-v27 td { display: grid; grid-template-columns: minmax(120px,30%) 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
    .report-table-v27 td::before { content: attr(data-label); color: var(--grey-mid); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
    .report-table-v27 td:last-child { border-bottom: 0; }
    .status-cell-v27 { text-align: left !important; }
    .status-dot-v27 { justify-self: start; }
    .report-table-v27 .copy-link-button span { display: inline; }
    .report-table-v27 .copy-link-button { gap: 6px; width: fit-content; }
    .package-summary-grid-v28 { grid-template-columns: 1fr 1fr; }
    .package-identity-card-v28 { grid-column: 1 / -1; }
    .package-test-card-v28 { grid-template-columns: 82px minmax(0,1fr); }
    .package-test-actions-v28 { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) auto; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 850px) {
    .report-toolbar { grid-template-columns: 1fr 1fr; }
    .category-products-direct { grid-template-columns: 1fr; }
    .category-products-direct button:first-child { grid-column: auto; }
    .package-identity-card-v28 dl { grid-template-columns: 1fr 1fr; }
    .package-test-card-v28 .package-test-meta { grid-template-columns: 1fr 1fr; }
    .technical-report-meta { grid-template-columns: 1fr 1fr; }
    .editor-sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .editor-sidebar button { grid-template-columns: 31px 1fr; }
}

@media (max-width: 620px) {
    .report-toolbar { grid-template-columns: 1fr; }
    .report-table-v27 td { grid-template-columns: 1fr; gap: 6px; }
    .package-summary-grid-v28 { grid-template-columns: 1fr; }
    .package-identity-card-v28 { grid-column: auto; }
    .package-identity-card-v28 dl { grid-template-columns: 1fr; }
    .package-test-card-v28 { grid-template-columns: 1fr; }
    .package-test-number { min-height: 76px; }
    .package-test-actions-v28 { grid-template-columns: 1fr; }
    .package-test-actions-v28 form,
    .package-test-actions-v28 .package-delete-button { width: 100%; }
    .package-test-card-v28 .package-test-meta { grid-template-columns: 1fr; }
    .technical-report-meta { grid-template-columns: 1fr; }
    .editor-sidebar { grid-template-columns: 1fr; }
}

/* =========================================================
   3U Vision Test Reports v2.9
   ========================================================= */

/* User account control: Profile for everyone, Admin only for the Owner. */
.nav-user-menu {
    position: relative;
    z-index: 320;
}
.nav-user-menu > summary {
    min-height: 46px;
    display: grid;
    grid-template-columns: 34px minmax(86px,1fr) 17px;
    align-items: center;
    gap: 9px;
    padding: 5px 9px 5px 7px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    color: var(--white);
    background: rgba(255,255,255,.055);
    list-style: none;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.nav-user-menu > summary::-webkit-details-marker { display: none; }
.nav-user-menu > summary:hover,
.nav-user-menu[open] > summary,
.nav-user-menu.is-active > summary {
    border-color: rgba(222,83,7,.58);
    background: rgba(255,255,255,.11);
    box-shadow: inset 0 -2px var(--orange);
}
.nav-user-menu .nav-user-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--white);
    background: var(--orange);
    font-family: Conthrax, Lato, sans-serif;
    font-size: 12px;
    font-weight: 800;
}
.nav-user-menu .nav-user-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}
.nav-user-menu .nav-user-copy strong,
.nav-user-menu .nav-user-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-user-menu .nav-user-copy strong { color: var(--white); font-size: 12px; line-height: 1.1; }
.nav-user-menu .nav-user-copy small { color: rgba(255,255,255,.62); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.nav-user-chevron { width: 17px; height: 17px; fill: none; stroke: rgba(255,255,255,.68); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.nav-user-menu[open] .nav-user-chevron { transform: rotate(180deg); }
.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 285px;
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 24px 58px rgba(63,67,72,.26);
}
[dir="rtl"] .nav-user-dropdown { right: auto; left: 0; }
.nav-user-dropdown a {
    min-height: 62px;
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    align-items: center;
    gap: 11px;
    padding: 10px;
    border-radius: 11px;
    color: var(--grey);
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}
.nav-user-dropdown a:hover,
.nav-user-dropdown a.is-current { color: var(--orange); background: rgba(222,83,7,.075); }
.nav-user-dropdown svg { width: 23px; height: 23px; justify-self: center; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-user-dropdown span { min-width: 0; display: grid; gap: 3px; }
.nav-user-dropdown strong { font-size: 13px; }
.nav-user-dropdown small { color: var(--grey-mid); font-size: 10px; line-height: 1.35; }

/* Official macro-category icons supplied in the approved icon sheet. */
.category-symbol img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.category-browser-card.cat-food .category-symbol img { width: 28px; height: 43px; }
.category-browser-card.cat-seeds .category-symbol img { width: 27px; height: 43px; }
.category-browser-card.cat-recycling .category-symbol img { width: 39px; height: 39px; }
.category-symbol svg { display: none !important; }

/* Report list status and search field refinements. */
.report-table-v27 th:first-child { white-space: nowrap; }
.status-badge-v29 {
    min-width: 66px;
    min-height: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .035em;
    text-transform: uppercase;
    white-space: nowrap;
}
.status-badge-v29 i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px currentColor; opacity: .9; }
.status-badge-v29.is-active { color: #378451; border-color: rgba(55,132,81,.2); background: rgba(55,132,81,.08); }
.status-badge-v29.is-disabled { color: #b73732; border-color: rgba(183,55,50,.2); background: rgba(183,55,50,.075); }
.report-table-v27 th:nth-child(1) { width: 7%; }
.report-table-v27 th:nth-child(2) { width: 12%; }
.report-table-v27 th:nth-child(3) { width: 11%; }
.report-table-v27 th:nth-child(4) { width: 8%; }
.report-table-v27 th:nth-child(5) { width: 9%; }
.report-table-v27 th:nth-child(6) { width: 8%; }
.report-table-v27 th:nth-child(7) { width: 6%; }
.report-table-v27 th:nth-child(8) { width: 23%; }
.report-table-v27 th:nth-child(9) { width: 16%; }
.report-toolbar { grid-template-columns: minmax(320px,1.35fr) repeat(3,minmax(150px,.52fr)); }
.search-control {
    display: flex !important;
    align-items: center;
    gap: 11px;
    padding: 0 14px !important;
}
.search-control svg {
    position: static !important;
    flex: 0 0 18px !important;
    width: 18px !important;
    height: 18px !important;
    transform: none !important;
}
.search-control input {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 0;
    padding: 0 !important;
    text-overflow: ellipsis;
}

/* Profile page. */
.profile-layout {
    display: grid;
    grid-template-columns: minmax(245px,.68fr) minmax(0,1.75fr);
    gap: 20px;
    align-items: start;
}
.profile-summary-card {
    position: sticky;
    top: 105px;
    display: grid;
    justify-items: center;
    padding: 30px 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(160deg, var(--white), #f3f4f4);
    box-shadow: var(--shadow-soft);
    text-align: center;
}
.profile-avatar-large {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    margin-bottom: 17px;
    border-radius: 24px;
    color: var(--white);
    background: linear-gradient(145deg, var(--orange), #f27c3d);
    box-shadow: 0 15px 32px rgba(222,83,7,.22);
    font-family: Conthrax, Lato, sans-serif;
    font-size: 28px;
}
.profile-summary-card > strong { color: var(--grey); font-family: Conthrax,Lato,sans-serif; font-size: 18px; }
.profile-summary-card > span { margin-top: 5px; color: var(--grey-mid); font-size: 12px; }
.profile-summary-card dl { width: 100%; display: grid; gap: 9px; margin: 24px 0 0; }
.profile-summary-card dl > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 12px; border-radius: 11px; background: rgba(79,83,88,.055); text-align: left; }
.profile-summary-card dt { color: var(--grey-mid); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.profile-summary-card dd { margin: 0; color: var(--grey); font-size: 12px; font-weight: 900; }
.profile-status-active { display: inline-flex; align-items: center; gap: 6px; }
.profile-status-active i { width: 8px; height: 8px; border-radius: 50%; background: #378451; box-shadow: 0 0 0 3px rgba(55,132,81,.12); }
.profile-form { padding: clamp(24px,3vw,38px); }
.profile-form .form-section-title > span svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profile-fields label { display: flex; flex-direction: column; gap: 8px; color: var(--grey); font-size: 12px; font-weight: 900; }
.profile-fields input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid rgba(79,83,88,.23); border-radius: 11px; color: var(--grey); background: var(--white); outline: none; }
.profile-fields input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(222,83,7,.09); }
.profile-fields input[readonly] { color: var(--grey-mid); background: var(--grey-soft); }
.profile-password-section { margin-top: 32px; padding-top: 30px; border-top: 1px solid var(--line); }
.compact-profile-title { margin-bottom: 22px; }
.profile-actions { margin-top: 30px; }

@media (max-width: 1120px) {
    .report-toolbar { grid-template-columns: 1fr 1fr; }
    .nav-user-menu > summary { grid-template-columns: 34px minmax(70px,1fr) 17px; }
}
@media (max-width: 900px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-summary-card { position: static; grid-template-columns: 84px minmax(0,1fr); justify-items: start; column-gap: 18px; text-align: left; }
    .profile-avatar-large { grid-row: 1 / 4; margin: 0; }
    .profile-summary-card dl { grid-column: 1 / -1; }
    .nav-user-dropdown { right: auto; left: 0; }
    [dir="rtl"] .nav-user-dropdown { right: 0; left: auto; }
}
@media (max-width: 640px) {
    .nav-user-menu { width: 100%; }
    .nav-user-menu > summary { width: 100%; grid-template-columns: 34px minmax(0,1fr) 17px; }
    .nav-user-dropdown { position: static; width: 100%; margin-top: 7px; box-shadow: none; }
    .report-toolbar { grid-template-columns: 1fr; }
    .status-badge-v29 { min-width: 0; }
    .profile-summary-card { grid-template-columns: 68px minmax(0,1fr); }
    .profile-avatar-large { width: 68px; height: 68px; border-radius: 19px; font-size: 23px; }
    .profile-fields { grid-template-columns: 1fr; }
    .profile-fields .form-span-2 { grid-column: auto; }
}

/* v2.10 - package details, compact test actions and sales documents. */
.package-summary-grid-v210 {
    display: grid;
    grid-template-columns: minmax(0,1.8fr) minmax(190px,.56fr) minmax(260px,.8fr);
    gap: 16px;
    align-items: stretch;
}
.package-summary-grid-v210 .package-summary-card {
    min-height: 190px;
    padding: 24px;
}
.package-identity-card-v210 { justify-content: flex-start; }
.package-identity-card-v210 > strong {
    display: block;
    margin: 7px 0 18px;
    color: var(--grey);
    font-family: Conthrax,Lato,sans-serif;
    font-size: clamp(18px,2vw,24px);
    line-height: 1.25;
}
.package-identity-card-v210 dl {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 10px;
    margin: 0;
}
.package-identity-card-v210 dl > div {
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid rgba(79,83,88,.08);
    border-radius: 12px;
    background: linear-gradient(145deg,#f7f8f7,#fff);
}
.package-identity-card-v210 dt,
.package-identity-card-v210 dd { margin: 0; }
.package-identity-card-v210 dt {
    color: var(--grey-mid);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.package-identity-card-v210 dd {
    margin-top: 7px;
    color: var(--grey);
    font-size: 12px;
    font-weight: 900;
    overflow-wrap: anywhere;
}
.package-count-card-v210 {
    align-items: center;
    justify-content: center;
    text-align: center;
}
.package-count-card-v210 .package-total {
    margin: 7px 0;
    color: var(--orange);
    font-family: Conthrax,Lato,sans-serif;
    font-size: clamp(42px,5vw,62px);
    line-height: 1;
}
.package-count-card-v210 small { max-width: 180px; color: var(--grey-mid); line-height: 1.45; }
.package-status-card-v210 {
    align-items: stretch;
    justify-content: space-between;
}
.package-status-card-v210 > span { text-align: left; }
.package-status-visual {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f7f8f7;
    text-align: left;
}
.package-status-visual > i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: currentColor;
}
.package-status-visual > i::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--white);
}
.package-status-visual.is-active { color: #2f7e4a; }
.package-status-visual.is-active > i { box-shadow: 0 0 0 7px rgba(47,126,74,.11); }
.package-status-visual.is-disabled { color: #b74637; }
.package-status-visual.is-disabled > i { box-shadow: 0 0 0 7px rgba(183,70,55,.1); }
.package-status-visual strong,
.package-status-visual small { display: block; }
.package-status-visual strong { color: var(--grey); font-size: 13px; }
.package-status-visual small { margin-top: 4px; color: var(--grey-mid); font-size: 10px; line-height: 1.35; }
.package-status-card-v210 form,
.package-status-card-v210 form .button { width: 100%; }

.package-test-card-v210 {
    grid-template-columns: 86px minmax(0,1fr) 198px;
    align-items: stretch;
}
.package-test-card-v210 .package-test-meta { grid-template-columns: repeat(4,minmax(0,1fr)); }
.package-test-actions-v210 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 9px;
    padding: 18px 16px;
}
.package-test-actions-v210 > .button { width: 100%; min-height: 40px; padding: 9px 10px; font-size: 11px; }
.package-test-actions-v210 .button-icon-text svg { width: 16px; height: 16px; flex: 0 0 16px; }
.package-compact-actions {
    display: grid;
    grid-template-columns: repeat(2,42px);
    justify-content: end;
    gap: 8px;
    margin-top: 2px;
}
.package-compact-actions form { width: auto; }
.package-icon-button {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(79,83,88,.22);
    border-radius: 11px;
    color: var(--grey);
    background: var(--white);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}
.package-icon-button:hover { transform: translateY(-1px); border-color: var(--orange); color: var(--orange); background: rgba(222,83,7,.055); }
.package-icon-button.delete:hover { border-color: #b74637; color: #b74637; background: rgba(183,70,55,.06); }
.package-icon-button.download:hover { border-color: #2f7e4a; color: #2f7e4a; background: rgba(47,126,74,.06); }
.package-icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.sales-documents-admin-section { margin-top: 22px; }
.sales-documents-heading { align-items: flex-end; }
.sales-documents-heading .button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sales-document-upload {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: stretch;
    gap: 12px;
    margin-top: 22px;
}
.sales-document-dropzone {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: 48px minmax(0,1fr);
    align-items: center;
    gap: 14px;
    padding: 15px 17px;
    border: 1px dashed rgba(79,83,88,.34);
    border-radius: 15px;
    color: var(--grey);
    background: linear-gradient(145deg,#f8f9f8,#fff);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.sales-document-dropzone:hover,
.sales-document-dropzone:focus-within { border-color: var(--orange); background: rgba(222,83,7,.035); box-shadow: 0 0 0 4px rgba(222,83,7,.06); }
.sales-document-dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.sales-document-dropzone strong,
.sales-document-dropzone small { display: block; }
.sales-document-dropzone strong { font-size: 13px; }
.sales-document-dropzone small { margin-top: 4px; color: var(--grey-mid); font-size: 10px; line-height: 1.45; }
.sales-document-upload-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--orange);
    background: rgba(222,83,7,.09);
}
.sales-document-upload-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sales-document-upload > .button { min-width: 190px; }
.sales-documents-empty {
    min-height: 170px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--grey-mid);
    background: #fafbfa;
    text-align: center;
}
.sales-documents-empty svg { width: 36px; height: 36px; fill: none; stroke: var(--orange); stroke-width: 1.6; }
.sales-documents-empty strong { color: var(--grey); }
.sales-documents-empty span { max-width: 520px; font-size: 11px; line-height: 1.5; }
.sales-documents-admin-list { display: grid; gap: 10px; margin-top: 16px; }
.sales-document-admin-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 54px minmax(0,1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.sales-document-admin-card:hover { border-color: rgba(222,83,7,.32); box-shadow: 0 10px 26px rgba(79,83,88,.07); }
.document-type-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--grey);
    background: #eef0ef;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .04em;
}
.document-type-icon.type-pdf { color: #a63f35; background: rgba(166,63,53,.09); }
.document-type-icon.type-drawing { color: #276d9f; background: rgba(39,109,159,.09); }
.document-type-icon.type-spreadsheet { color: #2f7e4a; background: rgba(47,126,74,.09); }
.document-type-icon.type-presentation { color: #b75c25; background: rgba(183,92,37,.09); }
.document-type-icon.type-archive { color: #785c9d; background: rgba(120,92,157,.09); }
.sales-document-admin-copy { min-width: 0; }
.sales-document-admin-copy strong,
.sales-document-admin-copy span { display: block; }
.sales-document-admin-copy strong { overflow: hidden; color: var(--grey); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.sales-document-admin-copy span { margin-top: 5px; color: var(--grey-mid); font-size: 10px; }
.sales-document-admin-actions { display: flex; align-items: center; gap: 8px; }
.sales-document-admin-actions form { margin: 0; }

@media (max-width: 1180px) {
    .package-summary-grid-v210 { grid-template-columns: 1fr 1fr; }
    .package-identity-card-v210 { grid-column: 1/-1; }
    .package-test-card-v210 { grid-template-columns: 82px minmax(0,1fr); }
    .package-test-actions-v210 { grid-column: 1/-1; flex-direction: row; align-items: center; justify-content: flex-end; border-left: 0; border-top: 1px solid var(--line); }
    .package-test-actions-v210 > .button { width: auto; }
}
@media (max-width: 820px) {
    .package-identity-card-v210 dl { grid-template-columns: 1fr 1fr; }
    .package-test-card-v210 .package-test-meta { grid-template-columns: 1fr 1fr; }
    .sales-document-upload { grid-template-columns: 1fr; }
    .sales-document-upload > .button { width: 100%; }
}
@media (max-width: 620px) {
    .package-summary-grid-v210 { grid-template-columns: 1fr; }
    .package-identity-card-v210 { grid-column: auto; }
    .package-identity-card-v210 dl { grid-template-columns: 1fr; }
    .package-test-card-v210 { grid-template-columns: 1fr; }
    .package-test-number { min-height: 74px; }
    .package-test-actions-v210 { flex-direction: column; align-items: stretch; }
    .package-test-actions-v210 > .button { width: 100%; }
    .package-compact-actions { justify-content: end; }
    .package-test-card-v210 .package-test-meta { grid-template-columns: 1fr; }
    .sales-document-admin-card { grid-template-columns: 46px minmax(0,1fr); }
    .document-type-icon { width: 46px; height: 46px; }
    .sales-document-admin-actions { grid-column: 1/-1; justify-content: flex-end; padding-top: 8px; border-top: 1px solid var(--line); }
}

/* =========================================================
   3U Vision Test Reports v2.11
   ========================================================= */

/* More visible, still restrained login motion and the official delta motif. */
.login-v27 {
    background-size: 185% 185%, 170% 170%, 210% 210%;
    animation-duration: 11s;
}
.login-v27::before {
    opacity: .28;
    animation-duration: 15s;
}
.login-v27::after {
    width: 54vw;
    height: 54vw;
    background: radial-gradient(circle, rgba(222,83,7,.34), rgba(222,83,7,.11) 39%, transparent 70%);
    filter: blur(16px);
    animation-duration: 10s;
}
.login-card-v27::before {
    background-size: 180% 180%;
    animation: loginCardSheen 9s ease-in-out infinite alternate;
}
.login-brand-glow { display: none !important; }
.login-brand-panel-v27::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 500px;
    height: 500px;
    right: -158px;
    bottom: -128px;
    background: url("../img/brand/delta.svg") center / contain no-repeat;
    opacity: .14;
    transform: none;
    pointer-events: none;
}
.login-brand-panel-v27::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 310px;
    height: 310px;
    left: -190px;
    bottom: -190px;
    background: radial-gradient(circle, rgba(222,83,7,.28), transparent 68%);
    filter: blur(4px);
    pointer-events: none;
}
@keyframes loginCardSheen {
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}

/* Pulsing availability indicators used on the dashboard and package manager. */
@keyframes statusPulseGreen {
    0%, 100% { box-shadow: 0 0 0 0 rgba(55,132,81,.34); }
    50% { box-shadow: 0 0 0 7px rgba(55,132,81,0); }
}
@keyframes statusPulseRed {
    0%, 100% { box-shadow: 0 0 0 0 rgba(183,55,50,.32); }
    50% { box-shadow: 0 0 0 7px rgba(183,55,50,0); }
}
.status-badge-v29 i { position: relative; box-shadow: none; }
.status-badge-v29.is-active i { animation: statusPulseGreen 1.9s ease-out infinite; }
.status-badge-v29.is-disabled i { animation: statusPulseRed 1.9s ease-out infinite; }
.package-status-visual > i { position: relative; animation: statusPulseRed 1.9s ease-out infinite; }
.package-status-visual.is-active > i { animation-name: statusPulseGreen; }

/* Better use of report-list width without changing the approved action controls. */
.report-table-v27 th:nth-child(1) { width: 6%; }
.report-table-v27 th:nth-child(2) { width: 12%; }
.report-table-v27 th:nth-child(3) { width: 16%; }
.report-table-v27 th:nth-child(4) { width: 8%; }
.report-table-v27 th:nth-child(5) { width: 10%; }
.report-table-v27 th:nth-child(6) { width: 9%; }
.report-table-v27 th:nth-child(7) { width: 6%; }
.report-table-v27 th:nth-child(8) { width: 23%; }
.report-table-v27 th:nth-child(9) { width: 10%; }
.report-table-v27 .report-code,
.report-customer-cell strong { font-size: 13px; line-height: 1.35; }
.report-table-v27 .row-actions { justify-content: flex-end; }

/* Package details: slightly tighter counter and a wider, usable action rail. */
.package-summary-grid-v210 {
    grid-template-columns: minmax(0,1.95fr) minmax(170px,.48fr) minmax(250px,.72fr);
}
.package-count-card-v210 { padding-inline: 18px !important; }
.package-count-card-v210 .package-total { font-size: clamp(38px,4.2vw,54px); }
.package-test-card-v210 { grid-template-columns: 86px minmax(0,1fr) 286px; }
.package-test-actions-v210 { padding: 18px 20px; gap: 10px; }
.package-test-actions-v210 > .button { min-height: 42px; font-size: 12px; padding-inline: 13px; }
.package-compact-actions { justify-content: end; }

@media (max-width: 1320px) {
    .package-test-card-v210 { grid-template-columns: 82px minmax(0,1fr) 254px; }
    .package-test-actions-v210 { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .status-badge-v29 i,
    .package-status-visual > i,
    .login-card-v27::before { animation: none !important; }
}

/* =========================================================
   3U Vision Test Reports v2.13
   Final visual and permission-system refinements
   ========================================================= */

/* Keep every animated layer behind the login card and make the motion visible. */
.login-v27 {
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 22%, rgba(222,83,7,.48) 0, rgba(222,83,7,.19) 18%, transparent 40%),
        radial-gradient(circle at 88% 72%, rgba(255,255,255,.22) 0, rgba(255,255,255,.07) 23%, transparent 46%),
        radial-gradient(circle at 62% 8%, rgba(222,83,7,.23) 0, transparent 34%),
        linear-gradient(124deg,#35393d 0%,#565b60 39%,#454a4f 65%,#373b3f 100%);
    background-size: 180% 180%, 170% 170%, 190% 190%, 180% 180%;
    animation: loginBackgroundFlowV212 9s ease-in-out infinite alternate;
}
.login-v27::before {
    z-index: 0 !important;
    opacity: .34 !important;
    background-image:
        linear-gradient(rgba(255,255,255,.052) 1px,transparent 1px),
        linear-gradient(90deg,rgba(255,255,255,.052) 1px,transparent 1px);
    background-size: 58px 58px;
    animation: loginGridFlowV212 13s linear infinite !important;
}
.login-v27::after {
    z-index: 0 !important;
    width: 68vw !important;
    height: 68vw !important;
    right: -25vw !important;
    top: -31vw !important;
    opacity: .98;
    background: radial-gradient(circle,rgba(222,83,7,.48),rgba(222,83,7,.15) 37%,transparent 69%) !important;
    filter: blur(24px) !important;
    animation: loginOrbFlowV212 8s ease-in-out infinite alternate !important;
}
.login-shell-v27,
.login-footer-v27 { position: relative; z-index: 2 !important; }
.login-card-v27 {
    z-index: 2;
    transform: none !important;
    box-shadow:
        0 58px 130px rgba(35,38,41,.52),
        0 18px 44px rgba(35,38,41,.34),
        inset 0 1px 0 rgba(255,255,255,.22),
        inset 0 -1px 0 rgba(79,83,88,.16) !important;
}
/* No animation or sheen may sit over the form/card content. */
.login-card-v27::before { content: none !important; display: none !important; animation: none !important; }
.login-card-v27::after { z-index: 0; }
.login-brand-panel-v27 {
    z-index: 1;
    justify-content: flex-start !important;
    padding-top: clamp(38px,5vw,62px) !important;
    padding-bottom: clamp(34px,4.6vw,58px) !important;
}
.login-brand-panel-v27 > img {
    position: relative;
    z-index: 2;
    margin: 0;
    align-self: flex-start;
}
.login-brand-copy-v27 {
    position: relative;
    z-index: 2;
    margin-top: auto !important;
    margin-bottom: 4px;
}
/* Exact 90 degree official delta, derived from the supplied business-card motif. */
.login-brand-panel-v27::before {
    content: "" !important;
    position: absolute;
    z-index: 0 !important;
    width: min(520px,64vw) !important;
    height: min(520px,64vw) !important;
    right: -205px !important;
    bottom: -128px !important;
    background: url("../img/brand/delta.svg") center / contain no-repeat !important;
    opacity: .17 !important;
    transform: none !important;
    pointer-events: none;
}
.login-brand-panel-v27::after,
.login-brand-glow { content: none !important; display: none !important; }
@keyframes loginBackgroundFlowV212 {
    0% { background-position: 0% 20%,100% 80%,40% 0%,0% 50%; }
    50% { background-position: 24% 4%,68% 100%,75% 24%,56% 50%; }
    100% { background-position: 46% 18%,42% 60%,100% 5%,100% 50%; }
}
@keyframes loginGridFlowV212 {
    from { background-position: 0 0,0 0; }
    to { background-position: 116px 58px,58px 116px; }
}
@keyframes loginOrbFlowV212 {
    0% { transform: translate3d(0,0,0) scale(.92); }
    100% { transform: translate3d(-19vw,22vh,0) scale(1.18); }
}

/* Match the public navbar proportions and keep Dashboard styled on every admin page. */
.admin-topbar {
    min-height: 80px !important;
    padding-top: 9px !important;
    padding-bottom: 9px !important;
}
.admin-brand { width: 210px !important; height: 48px !important; }
.admin-brand img { max-height: 44px; object-fit: contain; }
.admin-nav > a.admin-nav-link {
    min-height: 44px;
    border: 1px solid rgba(255,255,255,.14) !important;
    color: var(--white) !important;
    background: rgba(255,255,255,.075) !important;
    box-shadow: inset 0 -2px rgba(255,255,255,.04);
}
.admin-nav > a.admin-nav-link:hover,
.admin-nav > a.admin-nav-link.is-active {
    border-color: rgba(222,83,7,.72) !important;
    background: rgba(255,255,255,.14) !important;
    box-shadow: inset 0 -3px var(--orange) !important;
}

/* Permission-restricted controls remain visible and clearly unavailable. */
.is-permission-disabled,
button.is-permission-disabled:disabled,
.button.is-permission-disabled,
.action-button.is-permission-disabled,
.package-icon-button.is-permission-disabled {
    opacity: 1 !important;
    color: rgba(255,255,255,.66) !important;
    border-color: #595e63 !important;
    background: #4f5358 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: grayscale(.35);
}
.editor-card.is-permission-locked {
    position: relative;
    opacity: .76;
}
.editor-card.is-permission-locked::after {
    content: "";
    position: absolute;
    z-index: 8;
    inset: 0;
    border-radius: inherit;
    background: rgba(79,83,88,.025);
    pointer-events: none;
}
.sales-permission-notice {
    border-left: 4px solid var(--orange);
    background: linear-gradient(135deg,rgba(222,83,7,.09),rgba(255,255,255,.82));
}

/* Dashboard filters include a fifth, report-date year filter. */
.report-toolbar {
    grid-template-columns: minmax(270px,1.35fr) repeat(4,minmax(118px,.52fr)) !important;
    gap: 10px !important;
}
.report-toolbar > select,
.search-control { min-width: 0; height: 48px !important; }
.search-control {
    overflow: visible !important;
    padding: 0 14px !important;
    gap: 11px !important;
}
.search-control svg { flex: 0 0 18px !important; }
.search-control input {
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    padding: 0 !important;
    font-size: 12px;
}

/* Wide-screen table: complete, no horizontal scrollbar and no clipped actions. */
.report-table-wrap {
    overflow: visible !important;
    contain: none !important;
}
.report-table-v27 {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    font-size: 10.5px;
}
.report-table-v27 th,
.report-table-v27 td {
    box-sizing: border-box;
    padding: 12px 7px !important;
    overflow: visible;
    vertical-align: middle;
}
.report-table-v27 th {
    font-size: 8.8px;
    line-height: 1.2;
    letter-spacing: .045em;
    white-space: normal;
}
.report-table-v27 th:nth-child(1) { width: 5.8% !important; white-space: nowrap; }
.report-table-v27 th:nth-child(2) { width: 12.2% !important; }
.report-table-v27 th:nth-child(3) { width: 16.2% !important; }
.report-table-v27 th:nth-child(4) { width: 8.4% !important; }
.report-table-v27 th:nth-child(5) { width: 9.3% !important; }
.report-table-v27 th:nth-child(6) { width: 8.4% !important; }
.report-table-v27 th:nth-child(7) { width: 6.2% !important; }
.report-table-v27 th:nth-child(8) { width: 20.2% !important; }
.report-table-v27 th:nth-child(9) { width: 13.3% !important; }
.report-table-v27 .report-code,
.report-customer-cell strong {
    color: var(--grey-deep);
    font-size: 13.5px !important;
    font-weight: 900;
    line-height: 1.3;
}
.report-table-v27 .report-code { font-family: Conthrax,Lato,sans-serif; font-size: 12px !important; }
.report-table-v27 .category-pill { font-size: 8.5px !important; }
.report-table-v27 .test-report-count { font-size: 19px !important; }
.report-table-v27 .audit-stack-v27 { grid-template-columns: 1fr 1fr; gap: 6px; }
.report-table-v27 .audit-stack-v27 > span { padding-left: 6px; }
.report-table-v27 .audit-stack-v27 small { font-size: 7.8px; }
.report-table-v27 .audit-stack-v27 strong { font-size: 10px; }
.report-table-v27 .audit-stack-v27 em { font-size: 8.4px; }
.status-badge-v29 {
    min-width: 58px;
    min-height: 26px;
    gap: 5px;
    padding-inline: 6px;
    font-size: 8px;
}
.status-badge-v29 i { width: 7px; height: 7px; flex-basis: 7px; }
.report-table-v27 .row-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4,31px);
    justify-content: end !important;
    gap: 5px;
    overflow: visible;
}
.report-table-v27 .row-actions form { width: 31px; margin: 0; }
.report-table-v27 .action-button { width: 31px !important; height: 31px !important; }

/* Package manager: readable details, two compact cards on large screens, generous action area. */
.package-summary-grid-v212 {
    display: grid;
    grid-template-columns: minmax(0,1.72fr) minmax(170px,.48fr) minmax(245px,.70fr) !important;
    gap: 16px;
    align-items: stretch;
}
.package-summary-grid-v212 .package-summary-card { min-height: 184px; padding: 23px; }
.package-identity-card-v212 > strong {
    margin: 6px 0 18px;
    color: var(--grey-deep);
    font-size: clamp(20px,2vw,27px);
}
.package-identity-card-v212 dl {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 9px;
    margin: 0;
}
.package-identity-card-v212 dl > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(79,83,88,.08);
    border-radius: 11px;
    background: var(--grey-soft);
}
.package-identity-card-v212 dt {
    color: var(--grey-mid);
    font-size: 8.5px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.package-identity-card-v212 dd {
    margin: 6px 0 0;
    color: var(--grey-deep);
    font-size: 13.5px;
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.package-count-card-v212 { padding-inline: 17px !important; }
.package-count-card-v212 .package-total { font-size: clamp(40px,4vw,54px); }
.package-count-card-v212 small { max-width: 175px; line-height: 1.45; }
.package-status-card-v212 .package-status-visual { width: 100%; }
.package-test-list-v212 {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 16px;
}
.package-test-card-v212 {
    min-width: 0;
    display: grid !important;
    grid-template-columns: 92px minmax(0,1fr) !important;
    grid-template-rows: auto auto;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}
.package-test-card-v212 .package-test-card-head {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 10px;
    border-right: 1px solid var(--line);
    background: linear-gradient(165deg,#4f5358,#41464b);
}
.package-test-card-v212 .package-test-number {
    min-height: 88px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 5px;
    color: var(--white);
    background: transparent;
}
.package-test-card-v212 .package-test-number span { color: rgba(255,255,255,.62); font-size: 7.5px; }
.package-test-card-v212 .package-test-number strong { color: var(--white); font-size: 31px; }
.package-test-card-v212 .test-state-chip {
    min-width: 0;
    justify-content: center;
    padding: 6px 5px;
    font-size: 7.5px;
}
.package-test-card-v212 .test-state-chip i { animation-duration: 1.9s; }
.package-test-card-v212 .package-test-copy {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding: 17px 18px 15px;
}
.package-test-card-v212 .package-test-title-row h3 { font-size: 17px; }
.package-test-card-v212 .package-test-meta {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
}
.package-test-card-v212 .package-test-meta span { padding: 9px; }
.package-test-card-v212 .package-test-actions-v212 {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid !important;
    grid-template-columns: minmax(126px,1.05fr) minmax(100px,.76fr) minmax(154px,1.18fr) auto;
    align-items: center;
    gap: 8px;
    padding: 12px 13px;
    border-top: 1px solid var(--line);
    border-left: 0 !important;
    background: #f4f5f4;
}
.package-test-actions-v212 > .button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 10.5px;
    line-height: 1.2;
}
.package-test-actions-v212 .button-icon-text svg { width: 16px; height: 16px; flex: 0 0 16px; }
.package-compact-actions-v212 {
    display: grid;
    grid-template-columns: repeat(3,39px);
    justify-content: end;
    gap: 7px;
    margin: 0;
}
.package-compact-actions-v212 form { width: 39px; margin: 0; }
.package-compact-actions-v212 .package-icon-button { width: 39px; height: 39px; border-radius: 10px; }
.package-tests-empty {
    min-height: 230px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 9px;
    padding: 35px;
    border: 1px dashed rgba(79,83,88,.25);
    border-radius: 18px;
    color: var(--grey-mid);
    background: linear-gradient(145deg,#fff,#f5f6f5);
    text-align: center;
}
.package-tests-empty svg { width: 42px; height: 42px; fill: none; stroke: var(--orange); stroke-width: 1.6; }
.package-tests-empty strong { color: var(--grey); font-size: 16px; }
.package-tests-empty span { max-width: 580px; font-size: 11px; line-height: 1.5; }

/* Password controls and required marks are stable on Profile and Owner/Admin pages. */
.password-field {
    position: relative !important;
    display: block !important;
    width: 100%;
    min-width: 0;
}
.password-field input {
    width: 100% !important;
    min-height: 48px;
    padding-right: 54px !important;
}
.password-field .password-toggle {
    position: absolute !important;
    top: 50% !important;
    right: 7px !important;
    bottom: auto !important;
    width: 38px !important;
    height: 38px !important;
    display: grid !important;
    place-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateY(-50%) !important;
    border: 0;
    border-radius: 9px;
    color: var(--grey-mid);
    background: transparent;
}
.password-field .password-toggle:hover { color: var(--orange); background: rgba(222,83,7,.08); }
.password-field .password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.field-caption {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    min-height: 18px;
    line-height: 1.3;
}
.required-mark {
    display: inline !important;
    color: var(--orange);
    font-size: 12px;
    line-height: 1;
}
.profile-fields input[readonly] {
    cursor: default;
    color: var(--grey);
    border-style: dashed;
    background: #eef0ef;
}

/* Owner area: clear role matrix and consistent user forms. */
.role-permission-panel {
    margin-bottom: 22px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}
.role-permission-heading h2 { margin: 5px 0 0; color: var(--grey); font-family: Conthrax,Lato,sans-serif; font-size: 20px; }
.role-permission-heading p { margin: 8px 0 0; color: var(--grey-mid); font-size: 11px; line-height: 1.5; }
.role-permission-grid {
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 10px;
    margin-top: 18px;
}
.role-permission-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    align-items: start;
    gap: 10px;
    padding: 13px;
    border: 1px solid rgba(79,83,88,.10);
    border-radius: 13px;
    background: var(--grey-soft);
}
.role-permission-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--orange);
    background: rgba(222,83,7,.09);
}
.role-permission-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.role-permission-card strong { color: var(--grey); font-size: 12px; }
.role-permission-card p { margin: 5px 0 0; color: var(--grey-mid); font-size: 9.5px; line-height: 1.45; }
.role-badge.role-technical { color: #2d6f8f; background: rgba(45,111,143,.10); }
.role-badge.role-sales { color: #a45422; background: rgba(164,84,34,.10); }
.role-badge.role-dealer { color: #6b5b8e; background: rgba(107,91,142,.10); }
.user-form > label,
.user-edit-grid > label { min-width: 0; }
.user-form label > .field-caption { margin-bottom: 0; }

/* Tablet/card transition happens before the table can ever clip. */
@media (max-width: 1320px) {
    .report-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
    .search-control { grid-column: 1 / -1; }
    .report-table-wrap { border: 0 !important; background: transparent !important; box-shadow: none !important; }
    .report-table-v27 thead { display: none !important; }
    .report-table-v27,
    .report-table-v27 tbody,
    .report-table-v27 tr,
    .report-table-v27 td { display: block !important; width: 100% !important; }
    .report-table-v27 tbody { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
    .report-table-v27 tr {
        min-width: 0;
        padding: 15px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: var(--white);
        box-shadow: var(--shadow-soft);
    }
    .report-table-v27 td {
        display: grid !important;
        grid-template-columns: minmax(118px,31%) minmax(0,1fr);
        align-items: center;
        gap: 11px;
        padding: 9px 0 !important;
        border-bottom: 1px solid var(--line);
    }
    .report-table-v27 td::before {
        content: attr(data-label);
        color: var(--grey-mid);
        font-size: 8.5px;
        font-weight: 900;
        letter-spacing: .055em;
        text-transform: uppercase;
    }
    .report-table-v27 td:last-child { border-bottom: 0; }
    .report-table-v27 .report-code,
    .report-customer-cell strong { overflow: visible; white-space: normal; }
    .report-table-v27 .copy-link-button span { display: inline; }
    .report-table-v27 .copy-link-button { width: fit-content; gap: 6px; }
    .report-table-v27 .row-actions { justify-content: start !important; }
    .package-summary-grid-v212 { grid-template-columns: 1fr 1fr !important; }
    .package-identity-card-v212 { grid-column: 1 / -1; }
    .package-test-list-v212 { grid-template-columns: 1fr; }
    .role-permission-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 900px) {
    .admin-topbar { min-height: 72px !important; }
    .admin-brand { width: 184px !important; height: 44px !important; }
    .package-summary-grid-v212 { grid-template-columns: 1fr !important; }
    .package-identity-card-v212 { grid-column: auto; }
    .package-identity-card-v212 dl { grid-template-columns: 1fr 1fr; }
    .package-test-actions-v212 {
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    }
    .package-compact-actions-v212 { grid-column: 1 / -1; justify-content: end; }
    .role-permission-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
    .login-brand-panel-v27 { min-height: 255px; }
    .login-brand-copy-v27 { margin-top: 50px !important; }
    .report-toolbar { grid-template-columns: 1fr !important; }
    .search-control { grid-column: auto; }
    .report-table-v27 tbody { grid-template-columns: 1fr; }
    .report-table-v27 td { grid-template-columns: minmax(105px,34%) minmax(0,1fr); }
    .package-identity-card-v212 dl { grid-template-columns: 1fr; }
    .package-test-card-v212 { grid-template-columns: 76px minmax(0,1fr) !important; }
    .package-test-card-v212 .package-test-copy { padding: 15px 14px; }
    .package-test-card-v212 .package-test-meta { grid-template-columns: 1fr; }
    .package-test-actions-v212 { grid-template-columns: 1fr !important; }
    .package-compact-actions-v212 { grid-column: auto; justify-content: end; }
    .role-permission-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .report-table-v27 td { grid-template-columns: 1fr; gap: 5px; }
    .report-table-v27 .audit-stack-v27 { grid-template-columns: 1fr; }
    .package-test-card-v212 { grid-template-columns: 1fr !important; }
    .package-test-card-v212 .package-test-card-head {
        grid-column: 1;
        flex-direction: row;
        align-items: center;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .package-test-card-v212 .package-test-number { min-height: 58px; grid-template-columns: auto auto; gap: 8px; }
    .package-test-card-v212 .package-test-copy { grid-column: 1; grid-row: 2; }
    .package-test-actions-v212 { grid-row: 3; }
}
@media (prefers-reduced-motion: reduce) {
    .login-v27,
    .login-v27::before,
    .login-v27::after,
    .status-badge-v29 i,
    .package-status-visual > i,
    .test-state-chip i { animation: none !important; }
}

/* Per-test public visibility indicator. */
.test-state-chip {
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 900;
    letter-spacing: .045em;
    text-transform: uppercase;
    white-space: nowrap;
}
.test-state-chip i {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: currentColor;
}
.test-state-chip.is-active {
    color: #64d286;
    border-color: rgba(100,210,134,.25);
    background: rgba(55,132,81,.18);
}
.test-state-chip.is-disabled {
    color: #ff8c83;
    border-color: rgba(255,140,131,.25);
    background: rgba(183,55,50,.18);
}
.test-state-chip.is-active i { animation: statusPulseGreen 1.9s ease-out infinite; }
.test-state-chip.is-disabled i { animation: statusPulseRed 1.9s ease-out infinite; }
@media (prefers-reduced-motion: reduce) {
    .test-state-chip i { animation: none !important; }
}

/* =========================================================
   3U Vision Test Reports v2.13
   Navigation, dashboard table and package-manager refinements
   ========================================================= */

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Login: stronger motion stays behind the glass card; no decorative bottom line. */
.login-v27 {
    background:
        radial-gradient(circle at 8% 18%, rgba(222,83,7,.64) 0, rgba(222,83,7,.24) 19%, transparent 42%),
        radial-gradient(circle at 91% 74%, rgba(255,255,255,.29) 0, rgba(255,255,255,.09) 22%, transparent 48%),
        radial-gradient(circle at 62% 4%, rgba(222,83,7,.32) 0, transparent 36%),
        linear-gradient(124deg,#34383c 0%,#585d62 38%,#454a4f 65%,#363a3e 100%) !important;
    background-size: 155% 155%, 150% 150%, 165% 165%, 170% 170% !important;
    animation: loginBackgroundFlowV213 7.5s ease-in-out infinite alternate !important;
}
.login-v27::before {
    opacity: .42 !important;
    background-size: 50px 50px !important;
    animation: loginGridFlowV213 10s linear infinite !important;
}
.login-v27::after {
    width: 72vw !important;
    height: 72vw !important;
    opacity: 1 !important;
    filter: blur(18px) !important;
    animation: loginOrbFlowV213 7s ease-in-out infinite alternate !important;
}
.login-card-v27::after { content: none !important; display: none !important; }
.login-brand-panel-v27 > img { margin-top: -10px !important; }
.login-brand-copy-v27 { margin-top: auto !important; margin-bottom: -2px !important; transform: translateY(14px); }
@keyframes loginBackgroundFlowV213 {
    0% { background-position: 0% 12%,100% 88%,38% 0%,0% 50%; }
    50% { background-position: 35% 0%,65% 100%,78% 28%,52% 50%; }
    100% { background-position: 62% 23%,28% 56%,100% 8%,100% 50%; }
}
@keyframes loginGridFlowV213 {
    from { background-position: 0 0,0 0; }
    to { background-position: 100px 50px,50px 100px; }
}
@keyframes loginOrbFlowV213 {
    0% { transform: translate3d(0,0,0) scale(.88); }
    100% { transform: translate3d(-23vw,27vh,0) scale(1.22); }
}

/* Navbar: restore the approved light glass Dashboard control. */
.admin-nav > a.admin-nav-link {
    min-height: 44px !important;
    color: var(--white) !important;
    border: 1px solid rgba(255,255,255,.24) !important;
    background: linear-gradient(180deg,rgba(255,255,255,.20),rgba(255,255,255,.09)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18),0 5px 15px rgba(35,38,41,.09) !important;
}
.admin-nav > a.admin-nav-link:hover,
.admin-nav > a.admin-nav-link.is-active {
    color: var(--white) !important;
    border-color: rgba(255,255,255,.38) !important;
    background: linear-gradient(180deg,rgba(255,255,255,.29),rgba(255,255,255,.14)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24),0 7px 18px rgba(35,38,41,.12) !important;
}
.logout-icon-link {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    display: inline-grid !important;
    place-items: center;
    padding: 0 !important;
    color: rgba(255,255,255,.88) !important;
    border: 1px solid rgba(255,255,255,.20) !important;
    border-radius: 11px;
    background: rgba(255,255,255,.075);
    transition: background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease;
}
.logout-icon-link:hover { color: var(--white) !important; border-color: rgba(255,255,255,.38) !important; background: rgba(255,255,255,.15); transform: translateY(-1px); }
.logout-icon-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* One language-control design throughout admin and public pages. */
.admin-topbar .language-picker summary {
    min-width: 78px !important;
    height: 44px !important;
    padding: 0 13px !important;
    color: var(--white) !important;
    border: 1px solid rgba(255,255,255,.22) !important;
    border-radius: 11px !important;
    background: linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.075)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.admin-topbar .language-picker[open] summary,
.admin-topbar .language-picker summary:hover { border-color: rgba(255,255,255,.38) !important; background: rgba(255,255,255,.16) !important; }
.admin-topbar .language-menu {
    width: 390px !important;
    padding: 10px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 15px !important;
    color: var(--white) !important;
    background: #3f4348 !important;
    box-shadow: 0 25px 60px rgba(35,38,41,.38) !important;
}
.admin-topbar .language-menu button {
    min-height: 45px !important;
    color: #eef0f2 !important;
    border-radius: 9px !important;
}
.admin-topbar .language-menu button:hover,
.admin-topbar .language-menu button.is-current { color: var(--white) !important; background: #4f5358 !important; }
.admin-topbar .language-menu button.is-current { box-shadow: inset 3px 0 var(--orange); }

/* Filter labels are stable and do not overlap the native/select arrow. */
.report-toolbar-v213 {
    grid-template-columns: minmax(260px,1.30fr) repeat(4,minmax(126px,.56fr)) !important;
    align-items: stretch !important;
    gap: 10px !important;
}
.report-toolbar-v213 .search-control { height: 58px !important; }
.toolbar-select {
    position: relative;
    min-width: 0;
    height: 58px;
    display: block;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    overflow: hidden;
}
.toolbar-select > span {
    position: absolute;
    z-index: 2;
    top: 7px;
    left: 12px;
    right: 34px;
    color: var(--grey-mid);
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .06em;
    text-transform: uppercase;
    pointer-events: none;
}
.toolbar-select > select {
    width: 100%;
    height: 100% !important;
    margin: 0;
    padding: 20px 36px 5px 12px !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: var(--grey) !important;
    background-color: transparent !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 800;
    line-height: 1.15 !important;
}
.toolbar-select:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(222,83,7,.08); }

/* Desktop report table uses all available width without clipping or excessive gaps. */
.report-table-wrap { overflow: hidden !important; }
.report-table-v27 th,
.report-table-v27 td { padding: 13px 10px !important; }
.report-table-v27 th:first-child,
.report-table-v27 td:first-child { padding-left: 14px !important; }
.report-table-v27 th:last-child,
.report-table-v27 td:last-child { padding-right: 14px !important; }
.report-table-v27 th:nth-child(1) { width: 6.2% !important; }
.report-table-v27 th:nth-child(2) { width: 13.4% !important; }
.report-table-v27 th:nth-child(3) { width: 14.2% !important; }
.report-table-v27 th:nth-child(4) { width: 8.3% !important; }
.report-table-v27 th:nth-child(5) { width: 9.2% !important; }
.report-table-v27 th:nth-child(6) { width: 8.7% !important; }
.report-table-v27 th:nth-child(7) { width: 6.1% !important; }
.report-table-v27 th:nth-child(8) { width: 19.9% !important; }
.report-table-v27 th:nth-child(9) { width: 14% !important; }
.report-table-v27 .report-code,
.report-table-v27 .report-customer-cell strong {
    color: var(--grey-deep) !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.32 !important;
}
.report-table-v27 .report-code { font-family: Conthrax,Lato,sans-serif; font-size: 13px !important; }
.report-table-v27 .row-actions { padding-right: 2px; }

/* Package manager: full-width cards, useful 3/4 information + 1/4 action rail. */
.package-test-list-v212 { grid-template-columns: 1fr !important; gap: 15px !important; }
.package-test-card-v212 {
    grid-template-columns: 88px minmax(0,3fr) minmax(278px,1fr) !important;
    grid-template-rows: 1fr !important;
    width: 100%;
}
.package-test-card-v212 .package-test-card-head { grid-column: 1 !important; grid-row: 1 !important; }
.package-test-card-v212 .package-test-copy { grid-column: 2 !important; grid-row: 1 !important; padding: 19px 22px !important; }
.package-test-card-v212 .package-test-actions-v212 {
    grid-column: 3 !important;
    grid-row: 1 !important;
    min-width: 0;
    grid-template-columns: 1fr !important;
    align-content: center;
    padding: 16px 18px !important;
    border-top: 0 !important;
    border-left: 1px solid var(--line);
    background: linear-gradient(145deg,#f7f8f7,#fff);
}
.package-test-card-v212 .package-test-meta-v213 { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
.package-test-card-v212 .package-test-meta-v213 span { min-height: 54px; }
.package-test-actions-v212 > .button { width: 100%; min-height: 40px; }
.package-compact-actions-v212 { grid-column: auto !important; justify-content: end !important; }

@media (max-width: 1320px) {
    .report-toolbar-v213 { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
    .report-toolbar-v213 .search-control { grid-column: 1 / -1; }
    .report-table-wrap { overflow: visible !important; }
    .package-test-card-v212 { grid-template-columns: 84px minmax(0,1fr) minmax(250px,.78fr) !important; }
}
@media (max-width: 980px) {
    .package-test-card-v212 { grid-template-columns: 78px minmax(0,1fr) !important; grid-template-rows: auto auto !important; }
    .package-test-card-v212 .package-test-actions-v212 {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        grid-template-columns: repeat(3,minmax(0,1fr)) !important;
        border-left: 0;
        border-top: 1px solid var(--line) !important;
    }
    .package-compact-actions-v212 { grid-column: 1 / -1 !important; }
}
@media (max-width: 720px) {
    .report-toolbar-v213 { grid-template-columns: 1fr !important; }
    .report-toolbar-v213 .search-control { grid-column: auto; }
    .package-test-card-v212 { grid-template-columns: 1fr !important; }
    .package-test-card-v212 .package-test-card-head { grid-column: 1 !important; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
    .package-test-card-v212 .package-test-copy { grid-column: 1 !important; grid-row: 2 !important; }
    .package-test-card-v212 .package-test-actions-v212 { grid-column: 1 !important; grid-row: 3 !important; grid-template-columns: 1fr !important; }
    .package-test-card-v212 .package-test-meta-v213 { grid-template-columns: 1fr !important; }
    .logout-icon-link { margin-left: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
    .login-v27,
    .login-v27::before,
    .login-v27::after { animation: none !important; }
}

/* =========================================================
   3U Vision Test Reports v2.14
   ========================================================= */

/* Dashboard uses the same restrained control as the language selector on every admin page. */
.admin-nav > a.admin-nav-link,
.admin-nav > a.admin-nav-link.is-active {
    min-width: 94px !important;
    min-height: 44px !important;
    padding: 0 14px !important;
    color: rgba(255,255,255,.94) !important;
    border: 1px solid rgba(255,255,255,.22) !important;
    border-radius: 11px !important;
    background: linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.075)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12) !important;
}
.admin-nav > a.admin-nav-link:hover,
.admin-nav > a.admin-nav-link.is-active:hover {
    color: var(--white) !important;
    border-color: rgba(255,255,255,.34) !important;
    background: linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,.12)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16) !important;
}
.nav-user-menu > summary:hover,
.nav-user-menu[open] > summary,
.nav-user-menu.is-active > summary {
    border-color: rgba(255,255,255,.28) !important;
    background: rgba(255,255,255,.105) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10) !important;
}

/* More breathing room between the three dashboard blocks without changing their approved structure. */
.dashboard-section + .dashboard-section { margin-top: 48px !important; }

/* Test-report list: keep the approved table, enlarge the key data and use the width more efficiently. */
.report-table-v27 th:nth-child(1) { width: 5.5% !important; }
.report-table-v27 th:nth-child(2) { width: 14% !important; }
.report-table-v27 th:nth-child(3) { width: 15% !important; }
.report-table-v27 th:nth-child(4) { width: 8.5% !important; }
.report-table-v27 th:nth-child(5) { width: 9.5% !important; }
.report-table-v27 th:nth-child(6) { width: 8.5% !important; }
.report-table-v27 th:nth-child(7) { width: 6% !important; }
.report-table-v27 th:nth-child(8) { width: 19% !important; }
.report-table-v27 th:nth-child(9) { width: 14% !important; }
.report-table-v27 th,
.report-table-v27 td { padding-inline: 9px !important; }
.report-table-v27 th:first-child,
.report-table-v27 td:first-child { padding-left: 15px !important; }
.report-table-v27 th:last-child,
.report-table-v27 td:last-child { padding-right: 15px !important; }
.report-code-line {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}
.report-code-line .copy-link-button {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin: 0 !important;
    padding: 0 !important;
}
.report-code-line .copy-link-button span { display: none !important; }
.report-code-line .copy-link-button svg { width: 15px; height: 15px; }
.report-table-v27 .report-code,
.report-table-v27 .report-customer-cell strong {
    font-size: 14.5px !important;
    line-height: 1.24 !important;
}
.report-table-v27 .report-code {
    min-width: 0;
    overflow-wrap: anywhere;
}
.report-table-v27 .row-actions { padding-right: 2px; }

/* Package manager: sections are distinct, details are readable and action controls use the full row. */
.package-test-section { margin-top: 42px !important; }
.sales-documents-admin-section { margin-top: 58px !important; }
.package-count-card-v212 { justify-content: center; }
.package-test-card-v212 .package-test-number span { font-size: 8.7px !important; letter-spacing: .11em; }
.package-test-card-v212 .package-test-number strong { font-size: 35px !important; }
.package-test-card-v212 .test-state-chip { min-height: 27px; font-size: 8.5px !important; }
.package-test-card-v212 .package-test-copy { padding: 20px 21px 18px !important; }
.package-test-card-v212 .package-test-title-row h3 { font-size: 20px !important; line-height: 1.2; }
.package-test-card-v212 .package-completion { min-width: 48px; min-height: 30px; font-size: 11px !important; }
.package-test-card-v212 .package-test-meta {
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    gap: 9px !important;
    margin-top: 15px;
}
.package-test-card-v212 .package-test-meta span {
    min-height: 58px;
    display: grid !important;
    align-content: center;
    gap: 6px !important;
    padding: 11px !important;
    color: var(--grey-deep) !important;
    font-size: 12.5px !important;
    line-height: 1.25;
}
.package-test-card-v212 .package-test-meta b {
    color: var(--grey-mid) !important;
    font-size: 8.5px !important;
    letter-spacing: .065em;
    text-transform: uppercase;
}
.package-test-card-v212 .package-test-actions-v212 {
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    gap: 9px !important;
    padding: 13px 15px 14px !important;
}
.package-test-actions-v212 > .button {
    min-height: 43px !important;
    padding-inline: 12px !important;
    font-size: 11px !important;
}
.package-compact-actions-v212 {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3,42px) !important;
    justify-content: center !important;
    gap: 9px !important;
    padding-top: 2px;
}
.package-compact-actions-v212 form,
.package-compact-actions-v212 .package-icon-button { width: 42px !important; height: 42px !important; }

@media (max-width: 1180px) {
    .report-table-v27 .report-code,
    .report-table-v27 .report-customer-cell strong { font-size: 13.2px !important; }
    .package-test-list-v212 { grid-template-columns: 1fr !important; }
}
@media (max-width: 760px) {
    .admin-nav > a.admin-nav-link,
    .admin-nav > a.admin-nav-link.is-active { width: 100%; justify-content: flex-start; }
    .report-code-line { justify-content: flex-start; }
    .package-test-card-v212 .package-test-meta { grid-template-columns: 1fr !important; }
    .package-test-card-v212 .package-test-actions-v212 { grid-template-columns: 1fr !important; }
    .package-compact-actions-v212 { grid-column: 1; }
}

/* v2.14 action-rail correction: keep the three primary controls readable and let the three compact controls fill their row. */
.package-test-card-v212 .package-test-actions-v212 {
    grid-template-columns: 1fr !important;
    align-content: center !important;
}
.package-test-actions-v212 > .button {
    width: 100% !important;
    min-height: 43px !important;
}
.package-compact-actions-v212 {
    grid-column: 1 !important;
    width: 100%;
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    justify-content: stretch !important;
    gap: 9px !important;
}
.package-compact-actions-v212 form,
.package-compact-actions-v212 .package-icon-button {
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
}
@media (max-width: 980px) {
    .package-test-card-v212 .package-test-actions-v212 { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
    .package-compact-actions-v212 { grid-column: 1 / -1 !important; }
}
@media (max-width: 720px) {
    .package-test-card-v212 .package-test-actions-v212 { grid-template-columns: 1fr !important; }
    .package-compact-actions-v212 { grid-column: 1 !important; }
}

/* =========================================================
   3U Vision Test Reports v2.15
   Dashboard spacing, report-list typography and package count
   ========================================================= */

/* Keep the approved dashboard structure while giving the three major sections more separation. */
.dashboard-section + .dashboard-section { margin-top: 64px !important; }

/* The code column no longer contains a redundant copy control. */
.report-code-line {
    min-width: 0;
    display: block !important;
}
.report-table-v27 .report-code {
    display: block;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
    letter-spacing: .01em;
}

/* Slightly stronger catalogue hierarchy without altering the approved table geometry. */
.report-table-v27 td:nth-child(4) .category-pill {
    font-size: 9.5px !important;
    line-height: 1.2;
}
.report-table-v27 td:nth-child(5) > strong,
.report-table-v27 td:nth-child(6) > span {
    font-size: 12.3px !important;
    line-height: 1.32;
}

/* Available-document count is visually centred inside its summary card. */
.package-count-card-v212 {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}
.package-count-card-v212 > span,
.package-count-card-v212 .package-total {
    width: 100%;
    text-align: center;
}

@media (max-width: 900px) {
    .dashboard-section + .dashboard-section { margin-top: 52px !important; }
}
@media (max-width: 640px) {
    .dashboard-section + .dashboard-section { margin-top: 42px !important; }
    .report-table-v27 .report-code { font-size: 14px !important; }
}


/* =========================================================
   3U Vision Test Reports v2.16
   Dashboard rhythm and status/code spacing
   ========================================================= */
.stats-grid-v25 + .dashboard-section { margin-top: 64px !important; }
.report-table-v27 th:nth-child(1) { width: 6.1% !important; padding-right: 12px !important; }
.report-table-v27 td:nth-child(1) { padding-right: 12px !important; }
.report-table-v27 th:nth-child(2) { width: 13.4% !important; padding-left: 12px !important; }
.report-table-v27 td:nth-child(2) { padding-left: 12px !important; }
.report-table-v27 th:nth-child(8) { width: 19% !important; }
@media (max-width: 900px) { .stats-grid-v25 + .dashboard-section { margin-top: 52px !important; } }
@media (max-width: 760px) { .report-table-v27 td:nth-child(1), .report-table-v27 td:nth-child(2) { padding-left: 0 !important; padding-right: 0 !important; } }
@media (max-width: 640px) { .stats-grid-v25 + .dashboard-section { margin-top: 42px !important; } }

/* ========================================================================== */
/* v2.23 - multi-category packages + capability links                         */
/* ========================================================================== */
.catalog-cluster-multi {
    grid-template-columns: minmax(210px,.72fr) minmax(0,1.14fr) minmax(0,1.14fr) !important;
    align-items: stretch;
}
.catalog-macro-field { align-self: start; }
.catalog-multi-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    align-content: start;
    gap: 9px;
}
.catalog-multi-field legend {
    width: 100%;
    display: grid;
    gap: 4px;
    margin: 0 0 4px;
    padding: 0;
}
.catalog-multi-field legend > small,
.catalog-macro-field > small {
    color: var(--grey-mid);
    font-size: 11px;
    line-height: 1.4;
}
.catalog-check-grid {
    min-height: 92px;
    max-height: 220px;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 7px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    scrollbar-width: thin;
}
.catalog-product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.catalog-check {
    min-width: 0 !important;
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid rgba(79,83,88,.12);
    border-radius: 9px;
    background: #f8f8f7;
    cursor: pointer;
    transition: background .16s ease,border-color .16s ease,transform .16s ease;
}
.catalog-check:hover { background: #f0f1ef; border-color: rgba(222,83,7,.28); transform: translateY(-1px); }
.catalog-check:has(input:checked) { border-color: rgba(222,83,7,.5); background: rgba(222,83,7,.075); }
.catalog-check input {
    width: 16px !important;
    height: 16px !important;
    min-height: 0 !important;
    flex: 0 0 16px;
    margin: 0;
    accent-color: var(--orange);
}
.catalog-check span { min-width: 0; color: var(--grey); font-size: 12px; font-weight: 800; line-height: 1.25; }
.catalog-empty-hint { grid-column: 1 / -1; align-self: center; padding: 12px; color: var(--grey-mid); font-size: 12px; text-align: center; }
.internal-code-note { color: var(--grey-mid) !important; line-height: 1.45; }
.multi-catalog-value { line-height: 1.5 !important; }
.multi-catalog-cell { display: block; color: var(--grey); font-size: 11px; font-weight: 800; line-height: 1.35; }
.package-heading-actions { flex-wrap: wrap; justify-content: flex-end; }
.package-link-button { white-space: nowrap; }
.package-link-hidden { border-style: dashed; }
.package-link-hidden svg { stroke-width: 1.7; }
.publication-settings-v223 { grid-template-columns: minmax(0,1.2fr) minmax(260px,.8fr) !important; }
.publication-link-note {
    min-height: 86px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 15px 17px;
    border: 1px solid rgba(79,83,88,.14);
    border-radius: 14px;
    background: #f5f6f4;
}
.publication-link-note strong { color: var(--grey); font-size: 13px; }
.publication-link-note small { color: var(--grey-mid); line-height: 1.45; }
@media (max-width: 1080px) {
    .catalog-cluster-multi { grid-template-columns: 1fr 1fr !important; }
    .catalog-macro-field { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .catalog-cluster-multi { grid-template-columns: 1fr !important; }
    .catalog-macro-field { grid-column: auto; }
    .catalog-check-grid,.catalog-product-grid { grid-template-columns: 1fr 1fr; max-height: 260px; }
    .publication-settings-v223 { grid-template-columns: 1fr !important; }
    .package-heading-actions { justify-content: stretch; }
    .package-heading-actions .button { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
    .catalog-check-grid,.catalog-product-grid { grid-template-columns: 1fr; }
}

/* v2.23: SEEDS exposes products directly; its single catalogue group remains implicit. */
.catalog-multi-field.is-implicit { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }

/* ========================================================================== */
/* v2.24 - dynamic catalogue, multi-macro packages and dashboard pagination   */
/* ========================================================================== */
.catalog-cluster-v224 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: start;
}
.catalog-cluster-v224 .catalog-check-grid { min-height: 118px; max-height: 250px; }
.catalog-macro-grid { grid-template-columns: 1fr !important; }
.catalog-check-macro span { font-size: 12.5px !important; letter-spacing: .035em; }
.category-pill-stack { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.category-pill.cat-custom,
.category-browser-card.cat-custom { --cat: #4f5358; --cat-rgb: 79,83,88; }
.category-browser-card.cat-custom > summary { background: linear-gradient(135deg,#555a60,#45494e); color: #fff; }
.category-generic-symbol {
    width: 42px; height: 42px; display: grid; place-items: center;
    border-radius: 11px; background: rgba(255,255,255,.14); color: #fff;
    font-family: Conthrax,Lato,sans-serif; font-size: 13px; letter-spacing: .04em;
}

/* Filters: fixed visual rhythm and one compact reset control at the end. */
.report-toolbar-v224 {
    display: grid !important;
    grid-template-columns: minmax(210px,1.45fr) repeat(4,minmax(122px,.82fr)) 40px;
    gap: 10px !important;
    align-items: end !important;
}
.report-toolbar-v224 .search-control,
.report-toolbar-v224 .toolbar-select { min-width: 0; width: 100%; }
.report-toolbar-v224 .toolbar-select > span {
    display: block; margin: 0 0 5px 2px; color: var(--grey-mid);
    font-size: 9px; font-weight: 900; line-height: 1; letter-spacing: .07em; text-transform: uppercase;
}
.report-toolbar-v224 .toolbar-select select,
.report-toolbar-v224 .search-control input { width: 100%; min-width: 0; }
.filter-reset-button {
    width: 40px; height: 40px; margin: 0; padding: 0; border: 1px solid var(--line);
    border-radius: 10px; background: linear-gradient(180deg,#fff,#f4f5f3); color: var(--grey);
    display: grid; place-items: center; cursor: pointer; transition: background .16s ease,transform .16s ease,border-color .16s ease;
}
.filter-reset-button:hover { background: #eceeeb; border-color: rgba(79,83,88,.25); transform: translateY(-1px); }
.filter-reset-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Keep the approved report table dense enough to fit without horizontal scrolling. */
.report-table-v224 { table-layout: fixed !important; width: 100% !important; }
.report-table-v224 th:nth-child(1) { width: 6.2% !important; }
.report-table-v224 th:nth-child(2) { width: 11.4% !important; }
.report-table-v224 th:nth-child(3) { width: 13.8% !important; }
.report-table-v224 th:nth-child(4) { width: 11.4% !important; }
.report-table-v224 th:nth-child(5) { width: 12.2% !important; }
.report-table-v224 th:nth-child(6) { width: 11.2% !important; }
.report-table-v224 th:nth-child(7) { width: 6.2% !important; }
.report-table-v224 th:nth-child(8) { width: 17.1% !important; }
.report-table-v224 th:nth-child(9) { width: 10.5% !important; }
.report-table-v224 td,.report-table-v224 th { overflow-wrap: anywhere; }
.report-table-v224 .multi-catalog-cell { font-size: 11.4px !important; }
.report-table-v224 .category-pill { max-width: 100%; white-space: normal; }

.report-pagination {
    margin-top: 18px; min-height: 44px; display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px;
    background: linear-gradient(180deg,#fff,#fafaf9);
}
.report-pagination[hidden] { display: none !important; }
.report-pagination button {
    min-width: 34px; height: 34px; padding: 0 8px; display: grid; place-items: center;
    border: 1px solid rgba(79,83,88,.16); border-radius: 9px; background: #fff; color: var(--grey);
    font: 900 12px/1 Lato,sans-serif; cursor: pointer; transition: background .15s ease,border-color .15s ease,transform .15s ease;
}
.report-pagination button:hover:not(:disabled) { background: #f0f1ef; border-color: rgba(79,83,88,.3); transform: translateY(-1px); }
.report-pagination button.is-current { background: var(--orange); color: #fff; border-color: var(--orange); }
.report-pagination button:disabled { opacity: .35; cursor: default; }
.report-page-numbers { display: flex; align-items: center; gap: 6px; }
.pagination-ellipsis { min-width: 24px; text-align: center; color: var(--grey-mid); }
.report-pagination [data-page-summary] { margin-left: 8px; color: var(--grey-mid); font-size: 11px; font-weight: 800; white-space: nowrap; }

/* Catalogue settings - same cards, spacing and form language as the admin area. */
.settings-heading { margin-bottom: 24px; }
.settings-section { display: grid; gap: 22px; }
.catalog-settings-list { display: grid; gap: 18px; }
.catalog-settings-card {
    border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 12px 28px rgba(79,83,88,.055); overflow: hidden;
}
.catalog-settings-card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px;
    background: linear-gradient(180deg,#fff,#f7f8f6); border-bottom: 1px solid var(--line);
}
.catalog-settings-card-head > div { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; row-gap: 3px; }
.catalog-settings-card-head strong { color: var(--grey); font-family: Conthrax,Lato,sans-serif; font-size: 16px; line-height: 1.2; }
.catalog-settings-card-head small { grid-column: 2; color: var(--grey-mid); font-size: 10px; }
.catalog-status-chip { width: max-content; padding: 4px 7px; border-radius: 999px; font-size: 8px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.catalog-status-chip.is-active { color: #31663b; background: #e8f4e9; }
.catalog-status-chip.is-archived { color: #6b6e72; background: #eceeec; }
.catalog-settings-form { display: grid; gap: 14px; padding: 18px 20px; }
.catalog-language-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.catalog-language-grid label { min-width: 0; display: grid; gap: 5px; }
.catalog-language-grid label > span { color: var(--grey-mid); font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .045em; }
.catalog-language-grid input { width: 100%; min-width: 0; height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--grey); font: 700 12px Lato,sans-serif; }
.catalog-language-grid input:focus { outline: 2px solid rgba(222,83,7,.14); border-color: rgba(222,83,7,.55); }
.catalog-settings-actions { display: flex; justify-content: flex-end; }
.catalog-subcategory-list { display: grid; gap: 8px; padding: 0 20px 20px; }
.catalog-subcategory-card { border: 1px solid rgba(79,83,88,.12); border-radius: 12px; background: #fbfbfa; overflow: hidden; }
.catalog-subcategory-card > summary,.catalog-add-macro-card > summary {
    list-style: none; min-height: 50px; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer;
}
.catalog-subcategory-card > summary::-webkit-details-marker,.catalog-add-macro-card > summary::-webkit-details-marker { display: none; }
.catalog-subcategory-card > summary > span:first-child { display: grid; gap: 3px; }
.catalog-subcategory-card > summary strong { color: var(--grey); font-size: 12.5px; }
.catalog-subcategory-card > summary small { color: var(--grey-mid); font-size: 9.5px; }
.catalog-subcategory-card[open] > summary { background: #f3f4f2; }
.catalog-subcategory-card[open] > summary .tree-chevron,.catalog-add-macro-card[open] > summary .tree-chevron { transform: rotate(180deg); }
.catalog-subcategory-body { border-top: 1px solid var(--line); padding-bottom: 14px; }
.catalog-subcategory-body > form:not(.catalog-settings-form) { padding: 0 20px; }
.catalog-add-card { border-style: dashed; }
.catalog-add-macro-card { margin-top: 16px; }
.catalog-archived-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.catalog-archived-grid article { display: grid; gap: 8px; align-content: start; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.catalog-archived-grid article strong { color: var(--grey); font-size: 13px; }
.catalog-archived-grid article small { color: var(--grey-mid); font-size: 10px; }

@media (max-width: 1220px) {
    .report-toolbar-v224 { grid-template-columns: minmax(210px,1.35fr) repeat(2,minmax(145px,1fr)) 40px; }
    .report-toolbar-v224 .toolbar-select:nth-of-type(3),.report-toolbar-v224 .toolbar-select:nth-of-type(4) { grid-row: 2; }
    .report-toolbar-v224 .filter-reset-button { grid-column: -2 / -1; grid-row: 2; }
    .catalog-language-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 980px) {
    .catalog-cluster-v224 { grid-template-columns: 1fr 1fr !important; }
    .catalog-cluster-v224 .catalog-macro-multi { grid-column: 1 / -1; }
    .catalog-language-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .catalog-archived-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .report-toolbar-v224 { grid-template-columns: 1fr 1fr !important; }
    .report-toolbar-v224 .search-control { grid-column: 1 / -1; }
    .report-toolbar-v224 .toolbar-select:nth-of-type(n) { grid-row: auto; }
    .report-toolbar-v224 .filter-reset-button { grid-column: auto; grid-row: auto; align-self: end; }
    .report-pagination { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
    .report-pagination [data-page-summary] { margin-left: auto; }
    .catalog-language-grid { grid-template-columns: 1fr 1fr; }
    .catalog-settings-card-head { align-items: flex-start; }
}
@media (max-width: 560px) {
    .catalog-cluster-v224 { grid-template-columns: 1fr !important; }
    .catalog-cluster-v224 .catalog-macro-multi { grid-column: auto; }
    .report-toolbar-v224 { grid-template-columns: 1fr !important; }
    .report-toolbar-v224 .search-control { grid-column: auto; }
    .filter-reset-button { justify-self: end; }
    .catalog-language-grid,.catalog-archived-grid { grid-template-columns: 1fr; }
    .catalog-settings-card-head { display: grid; }
    .catalog-settings-card-head form,.catalog-settings-card-head .button { width: 100%; }
}
.package-macro-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ========================================================================== */
/* v2.25 - dashboard width, Mining, stable data-package table, catalog products */
/* ========================================================================== */
:root { --category-mining: #b99600; }

/* Dashboard only: reclaim some of the unused side gutters without changing the rest of admin. */
.admin-body.is-dashboard-page .admin-main { width: min(1500px, calc(100% - 36px)) !important; }

/* Four official macro categories. */
.category-browser-grid-dynamic { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
.cat-mining .category-symbol, .category-pill.cat-mining { background: var(--category-mining) !important; }
.category-browser-card.cat-mining { border-top: 5px solid var(--category-mining) !important; }
.category-browser-card.cat-mining > summary { background: linear-gradient(135deg, rgba(185,150,0,.14), rgba(255,255,255,0) 65%) !important; }
.category-browser-card.cat-mining .category-symbol { background: var(--category-mining) !important; }
.category-symbol img,
.category-browser-card.cat-food .category-symbol img,
.category-browser-card.cat-recycling .category-symbol img,
.category-browser-card.cat-seeds .category-symbol img,
.category-browser-card.cat-mining .category-symbol img {
    width: 45px !important;
    height: 45px !important;
    object-fit: contain !important;
    filter: none !important;
}
.category-browser-card.cat-food .category-symbol img { width: 34px !important; }
.category-browser-card.cat-seeds .category-symbol img { width: 37px !important; }
.category-browser-card.cat-mining .category-symbol img { width: 35px !important; }

/* Login Caps Lock helper. */
.caps-lock-warning {
    display: block;
    margin: 7px 2px 0;
    color: var(--orange);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .015em;
}
.caps-lock-warning[hidden] { display: none !important; }

/* Keep the desktop filters on one row; reset is always the last control after Year. */
.report-toolbar-v224 {
    grid-template-columns: minmax(205px,1.42fr) repeat(4,minmax(116px,.78fr)) 42px !important;
    gap: 9px !important;
}
.report-toolbar-v224 .toolbar-select:nth-of-type(n),
.report-toolbar-v224 .filter-reset-button { grid-row: auto !important; grid-column: auto !important; }
.filter-reset-button { width: 42px; height: 42px; }
.filter-reset-button svg { width: 19px; height: 19px; }

/* Data packages: preserve every action and the complete internal code on desktop. */
@media (min-width: 1321px) {
    .report-table-wrap { overflow: visible !important; }
    .report-table-v224 { table-layout: fixed !important; width: 100% !important; }
    .report-table-v224 th:nth-child(1) { width: 6% !important; }
    .report-table-v224 th:nth-child(2) { width: 11.5% !important; }
    .report-table-v224 th:nth-child(3) { width: 12.5% !important; }
    .report-table-v224 th:nth-child(4) { width: 10.5% !important; }
    .report-table-v224 th:nth-child(5) { width: 11.5% !important; }
    .report-table-v224 th:nth-child(6) { width: 10.5% !important; }
    .report-table-v224 th:nth-child(7) { width: 6% !important; }
    .report-table-v224 th:nth-child(8) { width: 16.5% !important; }
    .report-table-v224 th:nth-child(9) { width: 15% !important; }
    .report-table-v224 th,
    .report-table-v224 td { padding-left: 9px !important; padding-right: 9px !important; overflow: visible !important; }
    .report-table-v224 th:first-child,
    .report-table-v224 td:first-child { padding-left: 13px !important; }
    .report-table-v224 th:last-child,
    .report-table-v224 td:last-child { padding-right: 13px !important; }
    .report-table-v224 .report-code {
        display: block !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
        overflow-wrap: normal !important;
        font-size: 14px !important;
        font-weight: 900 !important;
    }
    .report-table-v224 .report-customer-cell strong { font-size: 14px !important; }
    .report-table-v224 .row-actions {
        width: 100% !important;
        grid-template-columns: repeat(4,31px) !important;
        justify-content: end !important;
        gap: 6px !important;
        padding-right: 0 !important;
    }
}

/* Catalogue settings: product layer below each category. */
.catalog-product-settings {
    margin: 2px 20px 16px;
    padding: 14px;
    border: 1px solid rgba(79,83,88,.12);
    border-radius: 12px;
    background: #f7f8f6;
}
.catalog-product-settings-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.catalog-product-settings-title strong { color: var(--grey); font-size: 12px; font-weight: 900; }
.catalog-product-settings-title small { color: var(--grey-mid); font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.catalog-product-card {
    margin-top: 7px;
    border: 1px solid rgba(79,83,88,.12);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.catalog-product-card > summary {
    min-height: 42px;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    color: var(--grey);
    font-size: 11.5px;
    font-weight: 900;
    cursor: pointer;
}
.catalog-product-card > summary::-webkit-details-marker { display: none; }
.catalog-product-card[open] > summary { background: #f3f4f2; }
.catalog-product-card[open] > summary .tree-chevron { transform: rotate(180deg); }
.catalog-product-card-body { padding-bottom: 12px; border-top: 1px solid var(--line); }
.catalog-product-card-body .catalog-settings-form { padding-bottom: 10px; }
.catalog-product-delete { padding: 0 20px; }
.catalog-add-product-card { border-style: dashed; }

@media (max-width: 1320px) {
    .category-browser-grid-dynamic { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width: 1100px) and (min-width: 761px) {
    .report-toolbar-v224 { grid-template-columns: minmax(190px,1.25fr) repeat(4,minmax(102px,.72fr)) 42px !important; }
}
@media (max-width: 760px) {
    .admin-body.is-dashboard-page .admin-main { width: min(100% - 24px,1500px) !important; }
    .category-browser-grid-dynamic { grid-template-columns: 1fr !important; }
    .report-toolbar-v224 { grid-template-columns: 1fr 1fr !important; }
    .report-toolbar-v224 .search-control { grid-column: 1 / -1 !important; }
    .report-toolbar-v224 .filter-reset-button { justify-self: end; align-self: end; }
    .catalog-product-settings { margin-inline: 12px; padding: 10px; }
}
@media (max-width: 560px) {
    .report-toolbar-v224 { grid-template-columns: 1fr !important; }
    .report-toolbar-v224 .search-control { grid-column: auto !important; }
}

/* ========================================================================== */
/* v3.1 - fixed Caps Lock slot, canonical macro order, stable package rows,    */
/*        and unified dashboard search/filter control dimensions               */
/* ========================================================================== */

/* Reserve the warning line at all times so Caps Lock never moves the login card. */
.caps-lock-warning {
    display: block !important;
    min-height: 14px;
    height: 14px;
    margin: 7px 2px 0;
    line-height: 14px;
    overflow: hidden;
    visibility: visible;
    opacity: 1;
}
.caps-lock-warning[hidden] {
    display: block !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Search + four filters + clear filters share one visual baseline on desktop. */
.report-toolbar-v224 {
    grid-template-columns: minmax(245px,1.42fr) repeat(4,minmax(118px,.78fr)) 58px !important;
    gap: 10px !important;
    align-items: stretch !important;
}
.report-toolbar-v224 .search-control,
.report-toolbar-v224 .toolbar-select,
.report-toolbar-v224 .filter-reset-button {
    box-sizing: border-box !important;
    min-height: 58px !important;
    height: 58px !important;
    margin: 0 !important;
    align-self: stretch !important;
}
.report-toolbar-v224 .search-control {
    padding: 0 14px !important;
    border-radius: 12px !important;
}
.report-toolbar-v224 .search-control input {
    height: 56px !important;
    line-height: 56px !important;
}
.report-toolbar-v224 .toolbar-select > span {
    top: 7px !important;
    margin: 0 !important;
}
.report-toolbar-v224 .filter-reset-button {
    width: 58px !important;
    min-width: 58px !important;
    border-radius: 12px !important;
}
.report-toolbar-v224 .filter-reset-button svg {
    width: 20px !important;
    height: 20px !important;
}

/* Desktop/tablet rows stay the same height regardless of catalogue content. */
@media (min-width: 761px) {
    .report-table-v224 tbody tr {
        height: 82px !important;
    }
    .report-table-v224 tbody td {
        height: 82px !important;
        max-height: 82px !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        overflow: hidden !important;
    }
    .report-table-v224 .report-code-cell,
    .report-table-v224 .status-cell-v27,
    .report-table-v224 td:last-child {
        overflow: visible !important;
    }
    .report-table-v224 .report-customer-cell strong,
    .report-table-v224 .multi-catalog-cell {
        display: -webkit-box !important;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        max-height: 2.7em;
        overflow: hidden !important;
        line-height: 1.35 !important;
        text-overflow: ellipsis;
    }
    .report-table-v224 .category-pill-stack {
        max-height: 42px;
        overflow: hidden;
        align-content: center;
    }
    .report-table-v224 .category-pill {
        flex: 0 1 auto;
        max-width: 100%;
        white-space: nowrap !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .report-table-v224 .audit-stack-v27 {
        max-height: 54px;
        overflow: hidden;
    }
}

@media (max-width: 1100px) and (min-width: 761px) {
    .report-toolbar-v224 {
        grid-template-columns: minmax(190px,1.25fr) repeat(4,minmax(102px,.72fr)) 58px !important;
    }
}
@media (max-width: 760px) {
    .report-toolbar-v224 { grid-template-columns: 1fr 1fr !important; }
    .report-toolbar-v224 .search-control { grid-column: 1 / -1 !important; }
    .report-toolbar-v224 .filter-reset-button { width: 100% !important; min-width: 0 !important; justify-self: stretch !important; }
}
@media (max-width: 560px) {
    .report-toolbar-v224 { grid-template-columns: 1fr !important; }
    .report-toolbar-v224 .search-control { grid-column: auto !important; }
}


/* ========================================================================== */
/* v3.2 - macro product counters, 10-column package table and visual polish   */
/* ========================================================================== */

/* Caps Lock keeps the v3.1 reserved slot, with a clearer warning icon/text. */
.caps-lock-warning {
    display: flex !important;
    align-items: center;
    gap: 6px;
    min-height: 16px;
    height: 16px;
    line-height: 16px;
    font-size: 10.5px;
    letter-spacing: .055em;
    text-transform: uppercase;
}
.caps-lock-warning svg {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.caps-lock-warning[hidden] {
    display: flex !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Slightly larger toolbar typography, without changing the approved geometry. */
.report-toolbar-v224 .search-control input {
    font-size: 12.5px !important;
    font-weight: 700;
}
.report-toolbar-v224 .toolbar-select > span { font-size: 8.6px !important; }
.report-toolbar-v224 .toolbar-select > select { font-size: 11.6px !important; }

/* Ten explicit columns: Created and Modified are no longer a combined visual cell. */
@media (min-width: 1321px) {
    .report-table-v32 { table-layout: fixed !important; width: 100% !important; font-size: 11.4px !important; }
    .report-table-v32 th:nth-child(1)  { width: 6% !important; }
    .report-table-v32 th:nth-child(2)  { width: 11.5% !important; }
    .report-table-v32 th:nth-child(3)  { width: 13.5% !important; }
    .report-table-v32 th:nth-child(4)  { width: 12% !important; }
    .report-table-v32 th:nth-child(5)  { width: 10.5% !important; }
    .report-table-v32 th:nth-child(6)  { width: 10.5% !important; }
    .report-table-v32 th:nth-child(7)  { width: 6% !important; }
    .report-table-v32 th:nth-child(8)  { width: 8.5% !important; }
    .report-table-v32 th:nth-child(9)  { width: 8.5% !important; }
    .report-table-v32 th:nth-child(10) { width: 13% !important; }

    .report-table-v32 th,
    .report-table-v32 td {
        padding: 11px 8px !important;
        vertical-align: middle !important;
    }
    .report-table-v32 th {
        font-size: 9.6px !important;
        line-height: 1.2 !important;
        letter-spacing: .045em;
    }
    .report-table-v32 th:nth-child(1),
    .report-table-v32 th:nth-child(7),
    .report-table-v32 th:nth-child(8),
    .report-table-v32 th:nth-child(9),
    .report-table-v32 th:nth-child(10),
    .report-table-v32 td:nth-child(1),
    .report-table-v32 td:nth-child(7),
    .report-table-v32 td:nth-child(8),
    .report-table-v32 td:nth-child(9),
    .report-table-v32 td:nth-child(10) {
        text-align: center !important;
    }
    .report-table-v32 th:nth-child(10) { padding-inline: 6px !important; }
    .report-table-v32 .row-actions {
        justify-content: center !important;
        padding: 0 !important;
    }
}

/* Fixed-height rows remain fixed, but now leave enough vertical room for macro badges. */
@media (min-width: 761px) {
    .report-table-v32 tbody tr { height: 88px !important; }
    .report-table-v32 tbody td {
        height: 88px !important;
        max-height: 88px !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        overflow: hidden !important;
    }
    .report-table-v32 .report-code-cell,
    .report-table-v32 .status-cell-v27,
    .report-table-v32 .actions-cell-v32 { overflow: visible !important; }

    .report-table-v32 .report-code { font-size: 14.3px !important; }
    .report-table-v32 .report-customer-cell strong { font-size: 14.2px !important; }
    .report-table-v32 .multi-catalog-cell {
        font-size: 12.1px !important;
        line-height: 1.38 !important;
        -webkit-line-clamp: 2;
        max-height: 2.76em;
    }
    .report-table-v32 .test-report-count { font-size: 20px !important; line-height: 1 !important; }
    .report-table-v32 .test-count-cell-v32 small { display: block; margin-top: 4px; font-size: 8.7px; }

    .report-table-v32 .category-pill-stack {
        min-height: 28px;
        max-height: 58px;
        overflow: hidden;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        align-content: center;
        justify-content: flex-start;
        gap: 4px;
        padding-block: 3px;
    }
    .report-table-v32 td:nth-child(4) .category-pill {
        min-height: 22px !important;
        height: 22px !important;
        padding: 3px 6px !important;
        font-size: 9.2px !important;
        line-height: 1 !important;
        letter-spacing: .045em !important;
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    .audit-single-v32 {
        min-width: 0;
        display: grid;
        gap: 4px;
        justify-items: center;
        align-content: center;
        line-height: 1.18;
    }
    .audit-single-v32 strong {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: var(--grey-deep);
        font-size: 10.7px;
        font-weight: 900;
    }
    .audit-single-v32 em {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: var(--grey-mid);
        font-size: 9.2px;
        font-style: normal;
        font-weight: 700;
    }
}

/* Tablet/mobile uses the existing card layout; new cells inherit data-label cleanly. */
@media (max-width: 1320px) and (min-width: 761px) {
    .report-table-v32 .audit-single-v32 { justify-items: start; }
}
@media (max-width: 760px) {
    .report-table-v32 .audit-single-v32 { display: grid; gap: 3px; }
    .report-table-v32 .audit-single-v32 em { font-style: normal; color: var(--grey-mid); }
}
@media (max-width: 1320px) and (min-width: 761px) {
    .report-table-v32 tbody tr { height: auto !important; }
    .report-table-v32 tbody td {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .report-table-v32 .category-pill-stack,
    .report-table-v32 .multi-catalog-cell { max-height: none !important; overflow: visible !important; }
}

/* ========================================================================== */
/* v3.4 - Data Package table typography, alignment and rounded header         */
/* ========================================================================== */

/* Keep the table visually rounded on both top and bottom edges. */
.report-table-wrap {
    border-radius: 18px !important;
}
.report-table-v32 thead th:first-child {
    border-top-left-radius: 17px;
}
.report-table-v32 thead th:last-child {
    border-top-right-radius: 17px;
}
[dir="rtl"] .report-table-v32 thead th:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: 17px;
}
[dir="rtl"] .report-table-v32 thead th:last-child {
    border-top-right-radius: 0;
    border-top-left-radius: 17px;
}

@media (min-width: 1321px) {
    /* Every header follows the same left alignment as its column content. */
    .report-table-v32 th,
    .report-table-v32 th:nth-child(n),
    .report-table-v32 td:nth-child(n) {
        text-align: left !important;
    }

    /* Slightly larger body text while preserving the fixed desktop geometry. */
    .report-table-v32 {
        font-size: 12.2px !important;
    }
    .report-table-v32 th {
        font-size: 10.1px !important;
        letter-spacing: .04em !important;
    }
    .report-table-v32 .report-code {
        font-size: 16.2px !important;
        line-height: 1.15 !important;
        font-weight: 900 !important;
    }
    .report-table-v32 .report-customer-cell strong {
        font-size: 14.7px !important;
        line-height: 1.28 !important;
    }
    .report-table-v32 .multi-catalog-cell {
        font-size: 12.7px !important;
        line-height: 1.4 !important;
    }
    .report-table-v32 .test-report-count {
        font-size: 20.5px !important;
    }
    .report-table-v32 .test-count-cell-v32 small {
        font-size: 9.2px !important;
    }
    .report-table-v32 .audit-single-v32 {
        justify-items: start !important;
        text-align: left !important;
    }
    .report-table-v32 .audit-single-v32 strong {
        font-size: 11.3px !important;
    }
    .report-table-v32 .audit-single-v32 em {
        font-size: 9.7px !important;
    }
    .report-table-v32 .row-actions {
        justify-content: flex-start !important;
    }
}

@media (min-width: 761px) {
    /* A few extra pixels keep larger typography and multi-macro badges clean. */
    .report-table-v32 tbody tr {
        height: 92px !important;
    }
    .report-table-v32 tbody td {
        height: 92px !important;
        max-height: 92px !important;
    }
}

/* ========================================================================== */
/* v3.5 - Test Report editor: analysis, automatic diagram and photo fidelity  */
/* ========================================================================== */
.original-quality-note {
    display: inline-flex;
    margin-top: 8px;
    color: var(--grey-mid);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.45;
}

/* Never crop technical/product photos in the editor. The actual uploaded file
   is kept untouched on disk; this only changes the thumbnail presentation. */
.existing-media img,
.new-media-preview img {
    height: 150px !important;
    padding: 7px;
    object-fit: contain !important;
    background: #f1f2f2;
}
.existing-media strong,
.new-media-preview figcaption {
    padding: 9px 10px 4px !important;
    color: var(--grey-deep) !important;
    font-size: 11.5px !important;
    line-height: 1.3;
    font-weight: 900 !important;
}

.automatic-map-note {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    align-items: center;
    gap: 13px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f5f6f6;
}
.automatic-map-note-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--orange);
    background: rgba(222,83,7,.09);
    font-size: 22px;
    font-weight: 900;
}
.automatic-map-note strong { color: var(--grey-deep); font-size: 13px; }
.automatic-map-note p { margin: 4px 0 0; color: var(--grey-mid); font-size: 11.5px; line-height: 1.5; }

.pass-card-v35 > header {
    min-height: 58px;
    padding-inline: 18px;
}
.pass-card-v35 > header > strong { font-size: 14px; font-weight: 900; }
.pass-card-v35 .mass-table-scroll { overflow-x: auto; }
.pass-card-v35 .mass-grid {
    min-width: 980px;
    grid-template-columns: minmax(116px,.9fr) minmax(112px,.8fr) minmax(155px,1fr) minmax(128px,.9fr) minmax(142px,1fr) minmax(168px,1.05fr);
}
.pass-card-v35 .mass-grid > * {
    min-height: 54px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 800;
}
.pass-card-v35 .pass-grid-head > * {
    min-height: 42px;
    color: var(--grey-deep);
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: .055em;
}
.pass-card-v35 .pass-row > strong { font-size: 13px; font-weight: 900; }
.pass-card-v35 .mass-id-input {
    font-size: 16px !important;
    font-weight: 900 !important;
    letter-spacing: .05em;
}
.pass-card-v35 .mass-grid input,
.pass-card-v35 .mass-grid output,
.pass-card-v35 .throughput-input small { font-weight: 800; }
.pass-card-v35 .mass-balance-status {
    min-height: 48px;
    padding: 9px 14px;
    font-size: 11.5px;
}

.pass-analysis-panel {
    border-top: 1px solid #cfd3d6;
    background: #f5f6f7;
}
.pass-analysis-enable {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 16px;
    cursor: pointer;
}
.pass-analysis-enable > span:first-child { display: grid; gap: 4px; }
.pass-analysis-enable strong { color: var(--grey-deep); font-size: 13px; font-weight: 900; }
.pass-analysis-enable small { color: var(--grey-mid); font-size: 10.8px; line-height: 1.4; }
.pass-analysis-fields {
    display: none;
    padding: 0 16px 17px;
}
.pass-analysis-panel.is-open .pass-analysis-fields { display: block; }
.pass-analysis-meta {
    display: grid;
    grid-template-columns: minmax(170px,.7fr) minmax(190px,.8fr) minmax(230px,1fr);
    gap: 12px;
    align-items: end;
    margin-bottom: 13px;
}
.pass-analysis-meta label { display: grid; gap: 7px; }
.pass-analysis-meta input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    font-weight: 800;
}
.analysis-fraction-input { font-size: 15px !important; font-weight: 900 !important; letter-spacing: .04em; }
.analysis-weight-input { position: relative; display: block; }
.analysis-weight-input input { padding-right: 34px; }
.analysis-weight-input small {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--grey-mid);
    font-size: 11px;
    font-weight: 900;
}
.analysis-balance-status {
    min-height: 46px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid #cfd3d6;
    border-radius: 10px;
    background: #fff;
}
.analysis-balance-status strong { font-size: 11.5px; }
.analysis-balance-status span { color: var(--grey-mid); font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.analysis-balance-status.is-ok { border-color: rgba(0,158,72,.34); }
.analysis-balance-status.is-ok strong { color: #008c41; }
.analysis-balance-status.is-warning { border-color: rgba(202,39,39,.35); background: #fff8f8; }
.analysis-balance-status.is-warning strong { color: #bd2222; }
.analysis-result-head,
.analysis-result-row {
    display: grid;
    grid-template-columns: minmax(180px,1.4fr) minmax(130px,.75fr) minmax(90px,.45fr) 38px;
    align-items: center;
    gap: 8px;
}
.analysis-result-head {
    padding: 7px 9px;
    color: var(--grey-mid);
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.analysis-result-rows { display: grid; gap: 7px; }
.analysis-result-row input,
.analysis-result-row output {
    width: 100%;
    min-height: 43px;
    display: flex;
    align-items: center;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--grey-deep);
    background: #fff;
    font-size: 12.5px;
    font-weight: 800;
}
.analysis-result-row output { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.analysis-result-row button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    color: #a33e35;
    background: #f3dfdc;
    font-size: 19px;
    cursor: pointer;
}
.pass-analysis-panel .inline-add { margin-top: 10px; }

.automatic-sorting-preview-card {
    margin-top: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
.automatic-sorting-preview-head {
    display: flex;
    align-items: center;
    padding: 14px 17px;
    border-bottom: 1px solid var(--line);
    background: #f5f6f6;
}
.automatic-sorting-preview-head > div { display: grid; gap: 4px; }
.automatic-sorting-preview-head small { color: var(--grey-mid); font-size: 10.8px; }
.automatic-sorting-preview { min-height: 240px; padding: 8px 14px 15px; }
.automatic-sorting-preview .sorting-map-scroll { overflow-x: auto; padding: 12px 0 4px; }
.automatic-sorting-preview .sorting-map-svg { width: 100%; min-width: 850px; height: auto; overflow: visible; }
.automatic-sorting-preview .sort-edge { fill: none; stroke: #515861; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.automatic-sorting-preview .sort-node rect { fill: #fff; stroke-width: 5; }
.automatic-sorting-preview .sort-node-input rect { stroke: var(--orange); }
.automatic-sorting-preview .sort-node-accepted rect { stroke: #00a443; }
.automatic-sorting-preview .sort-node-rejected rect { stroke: #d71920; }
.automatic-sorting-preview .sort-node-id { fill: #4c525b; font-weight: 900; font-family: Lato,sans-serif; }
.automatic-sorting-preview .sort-node-label { font-size: 13px; font-weight: 900; font-family: Lato,sans-serif; }
.automatic-sorting-preview .sort-node-input .sort-node-label { fill: var(--orange); }
.automatic-sorting-preview .sort-node-accepted .sort-node-label { fill: #00a443; }
.automatic-sorting-preview .sort-node-rejected .sort-node-label { fill: #d71920; }

@media (max-width: 900px) {
    .pass-analysis-meta { grid-template-columns: 1fr 1fr; }
    .analysis-balance-status { grid-column: 1/-1; }
}
@media (max-width: 620px) {
    .pass-analysis-meta { grid-template-columns: 1fr; }
    .analysis-balance-status { grid-column: auto; }
    .analysis-result-head { display: none; }
    .analysis-result-row { grid-template-columns: 1fr 1fr 82px 38px; }
    .media-preview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* ========================================================================== */
/* v3.6 - compact multi-analysis editor, cascade diagram and portrait photos   */
/* ========================================================================== */
.pass-card-v36,
.pass-card-v36 input,
.pass-card-v36 output,
.pass-card-v36 button,
.pass-card-v36 small,
.pass-card-v36 strong { font-family: Lato, "Segoe UI", Arial, sans-serif; }

.pass-analyses-v36 {
    border-top: 1px solid #cfd3d6;
    background: #f7f8f8;
}
.pass-analyses-heading {
    min-height: 54px;
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #d9dcdf;
    background: #eef0f1;
}
.pass-analyses-heading > div { display: grid; gap: 3px; }
.pass-analyses-heading strong { color: var(--grey-deep); font-size: 12.5px; font-weight: 900; }
.pass-analyses-heading small { color: var(--grey-mid); font-size: 10.5px; font-weight: 700; line-height: 1.35; }
.analysis-slot-v36 { border-bottom: 1px solid #d9dcdf; background: #fff; }
.analysis-slot-v36:last-child { border-bottom: 0; }
.analysis-slot-toggle {
    min-height: 54px;
    display: grid;
    grid-template-columns: 48px minmax(0,1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    cursor: pointer;
}
.analysis-slot-v36.is-open .analysis-slot-toggle { background: #fafafa; }
.analysis-slot-id {
    min-width: 42px;
    height: 34px;
    display: grid;
    place-items: center;
    padding-inline: 7px;
    border: 1px solid #cdd1d4;
    border-radius: 8px;
    color: var(--grey-deep);
    background: #f2f3f4;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .035em;
}
.analysis-slot-copy { display: grid; gap: 2px; }
.analysis-slot-copy strong { color: var(--grey-deep); font-size: 12.5px; font-weight: 900; }
.analysis-slot-copy small { color: var(--grey-mid); font-size: 10px; font-weight: 700; }
.analysis-slot-fields { display: none; padding: 12px 14px 15px 74px; border-top: 1px solid #eceeef; background: #fafbfb; }
.analysis-slot-v36.is-open .analysis-slot-fields { display: block; }
.analysis-slot-meta {
    display: grid;
    grid-template-columns: minmax(190px,.65fr) minmax(260px,1fr);
    align-items: end;
    gap: 10px;
    margin-bottom: 10px;
}
.analysis-slot-meta label { display: grid; gap: 6px; }
.analysis-slot-meta input { min-height: 42px; padding: 8px 11px; font-size: 12.5px; font-weight: 800; }
.analysis-slot-v36 .analysis-balance-status { min-height: 42px; }
.analysis-slot-v36 .analysis-result-head,
.analysis-slot-v36 .analysis-result-row { grid-template-columns: minmax(170px,1.45fr) minmax(110px,.7fr) 84px 34px; }
.analysis-slot-v36 .analysis-result-row input,
.analysis-slot-v36 .analysis-result-row output { min-height: 39px; padding: 7px 10px; font-size: 12px; }
.analysis-slot-v36 .analysis-result-row button { width: 34px; height: 34px; font-size: 17px; }
.analysis-slot-v36 .inline-add { margin-top: 8px; min-height: 34px; font-size: 11px; }

/* Point-4 test and analysis photos are portrait by design. Keep the actual
   file untouched and use a portrait thumbnail instead of a horizontal frame. */
.test-photo-preview-grid { grid-template-columns: repeat(5,minmax(0,1fr)) !important; gap: 10px; }
.test-photo-preview-grid .existing-media img,
.test-photo-preview-grid .new-media-preview img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 3/4 !important;
    padding: 0 !important;
    object-fit: contain !important;
    background: #fff !important;
}
.test-photo-preview-grid .existing-media,
.test-photo-preview-grid .new-media-preview { background: #fff !important; }
.test-photo-preview-grid .existing-media strong,
.test-photo-preview-grid .new-media-preview figcaption { font-size: 11.8px !important; }

/* Cascade diagram typography follows the site's type system. */
.sorting-map-svg-v36 .sort-node-id { font-family: Lato, "Segoe UI", Arial, sans-serif !important; font-weight: 900 !important; }
.sorting-map-svg-v36 .sort-node-label { font-family: Lato, "Segoe UI", Arial, sans-serif !important; font-weight: 900 !important; }

@media (max-width: 1280px) {
    .test-photo-preview-grid { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
}
@media (max-width: 900px) {
    .analysis-slot-fields { padding-left: 14px; }
    .analysis-slot-meta { grid-template-columns: 1fr; }
    .test-photo-preview-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
}
@media (max-width: 620px) {
    .analysis-slot-toggle { grid-template-columns: 44px minmax(0,1fr) auto; padding-inline: 10px; gap: 9px; }
    .analysis-slot-fields { padding-inline: 10px; }
    .analysis-slot-v36 .analysis-result-head { display: none; }
    .analysis-slot-v36 .analysis-result-row { grid-template-columns: 1fr 90px 72px 34px; }
    .test-photo-preview-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}

/* ========================================================================== */
/* v3.7 - Mass Balance purity + inline expandable fraction analyses           */
/* ========================================================================== */
.pass-card-v37 .mass-grid {
    min-width: 1120px;
    grid-template-columns: minmax(112px,.82fr) minmax(102px,.72fr) minmax(148px,1fr) minmax(116px,.82fr) minmax(128px,.9fr) minmax(158px,1fr) minmax(126px,.82fr);
}
.pass-card-v37 .analysis-purity-cell {
    min-height: 54px;
    display: grid;
    grid-template-columns: minmax(0,1fr) 36px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
}
.pass-card-v37 .analysis-purity-cell output {
    min-height: 0 !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: var(--grey-deep);
    background: transparent !important;
    font-size: 13px;
    font-weight: 900;
}
.pass-card-v37 .analysis-purity-cell button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(222,83,7,.32);
    border-radius: 9px;
    color: var(--orange);
    background: rgba(222,83,7,.08);
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, color .16s ease;
}
.pass-card-v37 .analysis-purity-cell button:hover {
    color: #fff;
    background: var(--orange);
    transform: translateY(-1px);
}
.fraction-analysis-detail-v37 {
    display: none;
    min-width: 1120px;
    padding: 10px 12px 14px;
    border-bottom: 1px solid #d8dbde;
    background: #f4f5f6;
}
.fraction-analysis-detail-v37.is-open { display: block; }
.analysis-detail-head-v37 {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 12px;
    border: 1px solid #d6d9dc;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: #eceeef;
}
.analysis-detail-head-v37 > div {
    display: flex;
    align-items: center;
    gap: 11px;
}
.analysis-detail-head-v37 > div > span:last-child { display: grid; gap: 2px; }
.analysis-detail-head-v37 strong { color: var(--grey-deep); font-size: 12.5px; font-weight: 900; }
.analysis-detail-head-v37 small { color: var(--grey-mid); font-size: 10.5px; font-weight: 700; }
.analysis-remove-v37 {
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid #d8c6c4;
    border-radius: 8px;
    color: #9c3b33;
    background: #fff;
    font-size: 10.5px;
    font-weight: 900;
    cursor: pointer;
}
.analysis-slot-fields-v37 {
    padding: 12px;
    border: 1px solid #d6d9dc;
    border-radius: 0 0 12px 12px;
    background: #fff;
}
.fraction-analysis-detail-v37 .analysis-slot-meta {
    grid-template-columns: minmax(190px,.62fr) minmax(280px,1fr);
    margin-bottom: 11px;
}
.fraction-analysis-detail-v37 .analysis-result-head,
.fraction-analysis-detail-v37 .analysis-result-row {
    grid-template-columns: minmax(180px,1.5fr) minmax(110px,.7fr) 86px 34px;
}
.fraction-analysis-detail-v37 .inline-add { margin-top: 9px; }

@media (max-width: 900px) {
    .fraction-analysis-detail-v37 .analysis-slot-meta { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .analysis-detail-head-v37 { align-items: flex-start; }
    .fraction-analysis-detail-v37 .analysis-result-head { display: none; }
    .fraction-analysis-detail-v37 .analysis-result-row { grid-template-columns: 1fr 90px 72px 34px; }
}

/* Sorting-map IDs use the same display face as the rest of the 3U interface. */
.automatic-sorting-preview .sorting-map-svg-v37 .sort-node-id {
    font-family: Conthrax, Lato, sans-serif !important;
    font-weight: 700 !important;
}

/* Photo IDs/file names remain easy to read while preparing the report. */
.test-photo-preview-grid .existing-media strong,
.test-photo-preview-grid .new-media-preview figcaption {
    font-family: Conthrax, Lato, sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

/* ========================================================================== */
/* v3.8 - Analysis table refinement and 3U sorting-map typography             */
/* ========================================================================== */
.fraction-analysis-detail-v38 {
    padding: 12px 14px 15px !important;
    background: #f5f6f7 !important;
}
.analysis-detail-head-v38 {
    min-height: 46px !important;
    padding: 8px 12px !important;
    border-radius: 10px 10px 0 0 !important;
    background: #eceeef !important;
}
.analysis-detail-head-v38 strong,
.analysis-detail-head-v38 small,
.analysis-slot-fields-v38,
.analysis-slot-fields-v38 input,
.analysis-slot-fields-v38 output,
.analysis-slot-fields-v38 button {
    font-family: Lato, sans-serif !important;
}
.analysis-slot-fields-v38 {
    padding: 11px 12px 13px !important;
    border-radius: 0 0 10px 10px !important;
}
.analysis-slot-fields-v38 .analysis-result-head,
.analysis-slot-fields-v38 .analysis-result-row {
    grid-template-columns: minmax(190px,1.45fr) minmax(112px,.72fr) minmax(88px,.48fr) minmax(76px,.42fr) 34px !important;
    gap: 10px !important;
    align-items: center;
}
.analysis-slot-fields-v38 .analysis-result-head {
    padding: 5px 8px 7px !important;
    color: #737980;
    font-size: 10px !important;
    font-weight: 900 !important;
    letter-spacing: .055em;
    text-transform: uppercase;
}
.analysis-slot-fields-v38 .analysis-result-row-v38 {
    min-height: 44px;
}
.analysis-slot-fields-v38 .analysis-result-row-v38 input {
    min-height: 38px;
    font-size: 13px !important;
    font-weight: 700;
}
.analysis-slot-fields-v38 .analysis-result-row-v38 output {
    font-size: 13px !important;
    font-weight: 900 !important;
}
.analysis-total-row-v38 {
    margin-top: 8px;
    border: 1px solid #d6d9dc !important;
    border-radius: 8px;
    background: #f0f2f3 !important;
}
.analysis-total-row-v38 > strong:first-child {
    color: var(--grey-deep);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.analysis-total-row-v38 output,
.analysis-total-row-v38 [data-analysis-total-percent] {
    color: var(--grey-deep) !important;
    font-size: 13px !important;
    font-weight: 900 !important;
}
.automatic-sorting-preview .sorting-map-svg-v38 .sort-node-id {
    font-family: Conthrax, Lato, sans-serif !important;
    font-weight: 900 !important;
}
.automatic-sorting-preview .sorting-map-svg-v38 .sort-node-label {
    font-family: Lato, sans-serif !important;
    font-weight: 900 !important;
}
.automatic-sorting-preview .sorting-map-svg-v38 .sort-edge {
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}
@media (max-width: 700px) {
    .analysis-slot-fields-v38 .analysis-result-head { display: none !important; }
    .analysis-slot-fields-v38 .analysis-result-row {
        grid-template-columns: minmax(150px,1fr) 92px 74px 70px 34px !important;
    }
}

/* ========================================================================== */
/* v3.10 - compact analytics, unified selects and dashboard navigation polish */
/* ========================================================================== */

/* The analytics row is intentionally compact: four macro rows and four top
   categories define the height, and the daily chart follows the same rhythm. */
.analytics-grid-v310 {
    align-items: stretch;
}
.analytics-grid-v310 .chart-card {
    min-height: 304px !important;
}
.analytics-grid-v310 .chart-canvas-wrap {
    min-height: 205px !important;
    height: 205px !important;
}
.analytics-grid-v310 .compact-metrics {
    grid-template-rows: repeat(4, minmax(43px, 1fr));
}

/* One branded dropdown language for every native select in the authenticated
   interface. The custom flag-based language picker is a <details> component
   and is deliberately not touched by these rules. */
.admin-body select {
    -webkit-appearance: none !important;
    appearance: none !important;
    min-height: 48px;
    padding: 0 44px 0 13px !important;
    border: 1px solid rgba(79,83,88,.20) !important;
    border-radius: 11px !important;
    color: var(--grey-deep) !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234f5358' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 9 5 5 5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 15px !important;
    box-shadow: 0 4px 13px rgba(79,83,88,.045) !important;
    font-family: Lato, sans-serif !important;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2 !important;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.admin-body select:hover:not(:disabled) {
    border-color: rgba(222,83,7,.46) !important;
    background-color: #fff !important;
}
.admin-body select:focus {
    outline: none !important;
    border-color: var(--orange) !important;
    box-shadow: 0 0 0 4px rgba(222,83,7,.09) !important;
}
.admin-body select:disabled {
    color: rgba(79,83,88,.52) !important;
    background-color: #eef0f1 !important;
    cursor: not-allowed;
    box-shadow: none !important;
}

/* Dashboard filters use a labelled 58 px shell; keep that approved geometry
   while reusing the exact same arrow, typography and interaction language. */
.report-toolbar-v224 .toolbar-select > select {
    min-height: 0 !important;
    height: 100% !important;
    padding: 20px 42px 5px 12px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    background-position: right 13px center !important;
    box-shadow: none !important;
    font-size: 11.8px !important;
}
.report-toolbar-v224 .toolbar-select:hover {
    border-color: rgba(222,83,7,.46) !important;
}
.report-toolbar-v224 .toolbar-select:focus-within {
    border-color: var(--orange) !important;
    box-shadow: 0 0 0 4px rgba(222,83,7,.08) !important;
}

/* The month/year control now uses the same control dimensions as every other
   standalone dropdown, so its adjacent navigation buttons follow suit. */
.chart-controls select {
    min-width: 136px;
    width: auto;
    height: 48px !important;
    min-height: 48px !important;
}
.chart-controls .icon-button {
    width: 48px;
    height: 48px;
    border-radius: 11px;
}

@media (max-width: 1160px) {
    .analytics-grid-v310 .chart-canvas-wrap {
        min-height: 220px !important;
        height: 220px !important;
    }
}

/* ========================================================================== */
/* v3.11 - dynamic machine banner                                             */
/* ========================================================================== */
.machine-banner-preview-v311 {
    margin-top: 16px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(79,83,88,.16);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(79,83,88,.06);
}
.machine-banner-preview-v311 > .banner-placeholder {
    min-height: 190px;
    display: grid;
    place-items: center;
    padding: 28px;
    color: var(--grey-mid);
    background: #f4f5f4;
    border-radius: 12px;
    font-family: Lato, sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}
.machine-banner-dynamic {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: clamp(20px, 2.2vw, 34px);
    align-items: stretch;
    width: 100%;
    min-width: 0;
    background: #fff;
    font-family: Lato, sans-serif;
}
.machine-banner-media {
    min-width: 0;
    display: grid;
    gap: 10px;
}
.machine-banner-layout-landscape .machine-banner-media {
    grid-template-rows: minmax(250px, 1fr) auto;
}
.machine-banner-layout-portrait .machine-banner-media {
    grid-template-columns: minmax(0, 1.7fr) minmax(110px, .72fr);
    grid-template-rows: minmax(360px, 1fr);
}
.machine-banner-main-frame {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
    background: #fff;
}
.machine-banner-main-image {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none !important;
    object-fit: contain;
    object-position: center;
    background: #fff;
    transition: opacity .2s ease, transform .24s ease;
}
.machine-banner-main-image.is-changing {
    opacity: .68;
    transform: scale(.985);
}
.machine-banner-thumbnails {
    display: grid;
    gap: 8px;
    min-width: 0;
}
.machine-banner-layout-landscape .machine-banner-thumbnails {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 82px;
}
.machine-banner-layout-portrait .machine-banner-thumbnails {
    grid-template-columns: 1fr;
    grid-auto-rows: 1fr;
}
.machine-banner-thumb {
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 4px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.machine-banner-thumb:hover {
    transform: translateY(-2px);
    border-color: rgba(222,83,7,.24);
    box-shadow: 0 8px 20px rgba(79,83,88,.09);
}
.machine-banner-thumb.is-active { display: none; }
.machine-banner-thumb img {
    width: 100%;
    height: 100%;
    max-height: 118px !important;
    object-fit: contain;
    background: #fff;
}
.machine-banner-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(79,83,88,.16);
    border-radius: 10px;
    color: #4f5358;
    background: rgba(255,255,255,.92);
    box-shadow: 0 8px 22px rgba(79,83,88,.12);
    transform: translateY(-50%);
    cursor: pointer;
    transition: color .16s ease, border-color .16s ease, transform .16s ease, background .16s ease;
}
.machine-banner-arrow:hover {
    color: #de5307;
    border-color: rgba(222,83,7,.35);
    background: #fff;
    transform: translateY(-50%) scale(1.04);
}
.machine-banner-arrow-prev { left: 8px; }
.machine-banner-arrow-next { right: 8px; }
.machine-banner-arrow svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.machine-banner-features {
    min-width: 0;
    display: grid;
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: clamp(7px, .8vw, 13px);
    align-content: center;
}
.machine-banner-feature {
    min-width: 0;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
}
.machine-banner-feature-icon {
    width: 54px !important;
    height: 54px !important;
    max-height: none !important;
    object-fit: contain !important;
    background: #fff !important;
}
.machine-banner-feature p {
    margin: 0;
    color: #4f5358;
    font-family: Lato, sans-serif;
    font-size: clamp(11.5px, .86vw, 14px);
    line-height: 1.32;
    font-weight: 500;
}
.machine-banner-feature strong {
    color: #de5307;
    font-weight: 900;
}
.machine-banner-feature span { font-weight: 500; }
@media (max-width: 1080px) {
    .machine-banner-dynamic { grid-template-columns: 1fr; }
    .machine-banner-layout-portrait .machine-banner-media,
    .machine-banner-layout-landscape .machine-banner-media {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(280px, 1fr) auto;
    }
    .machine-banner-layout-portrait .machine-banner-thumbnails,
    .machine-banner-layout-landscape .machine-banner-thumbnails {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-rows: auto;
    }
    .machine-banner-feature p { font-size: 13px; }
}
@media (max-width: 620px) {
    .machine-banner-preview-v311 { padding: 10px; }
    .machine-banner-layout-portrait .machine-banner-media,
    .machine-banner-layout-landscape .machine-banner-media { grid-template-rows: minmax(220px, 1fr) auto; }
    .machine-banner-feature { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
    .machine-banner-feature-icon { width: 44px !important; height: 44px !important; }
    .machine-banner-arrow { width: 38px; height: 38px; }
}

/* ========================================================================== */
/* v3.13 - dynamic machine banner navigation and native-quality image display  */
/* ========================================================================== */
.machine-banner-primary {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 9px;
}
.machine-banner-layout-landscape .machine-banner-media {
    grid-template-rows: minmax(310px, 1fr) auto;
}
.machine-banner-layout-portrait .machine-banner-media {
    grid-template-columns: minmax(0, 1.7fr) minmax(110px, .72fr);
    grid-template-rows: minmax(410px, 1fr);
}
.machine-banner-main-frame { padding: 4px; }
.machine-banner-main-image {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    image-rendering: auto;
}
.machine-banner-controls {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
}
.machine-banner-arrow {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
}
.machine-banner-arrow:hover { transform: translateY(-1px) !important; }
.machine-banner-counter {
    min-width: 52px;
    color: #73797f;
    font-family: Lato, sans-serif;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    letter-spacing: .05em;
}
.machine-banner-thumb img { image-rendering: auto; }
@media (max-width: 1080px) {
    .machine-banner-layout-portrait .machine-banner-media,
    .machine-banner-layout-landscape .machine-banner-media {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(320px, 1fr) auto;
    }
}
@media (max-width: 620px) {
    .machine-banner-layout-portrait .machine-banner-media,
    .machine-banner-layout-landscape .machine-banner-media {
        grid-template-rows: minmax(245px, 1fr) auto;
    }
}

/* ========================================================================== */
/* v3.14 - machine banner editor preview layout                               */
/* ========================================================================== */
.machine-banner-preview-v311 { padding: clamp(16px, 1.8vw, 24px); }
.machine-banner-dynamic {
    gap: clamp(22px, 2.2vw, 34px);
}
.machine-banner-media { gap: 13px; }
.machine-banner-primary {
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
}
.machine-banner-main-frame { padding: 8px; }
.machine-banner-controls {
    position: relative;
    z-index: 5;
    min-height: 46px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 2px;
    visibility: visible !important;
    opacity: 1 !important;
}
.machine-banner-arrow {
    position: static !important;
    flex: 0 0 42px;
    width: 42px !important;
    height: 42px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}
.machine-banner-arrow:hover { transform: translateY(-1px) !important; }
.machine-banner-arrow svg { display: block; width: 22px; height: 22px; margin: 0; }
.machine-banner-counter { min-width: 56px; font-size: 13px; }
.machine-banner-thumbnails { gap: 10px; }
@media (max-width: 620px) {
    .machine-banner-preview-v311 { padding: 10px; }
    .machine-banner-arrow { flex-basis: 38px; width: 38px !important; height: 38px !important; }
}

/* ========================================================================== */
/* v3.15 - medium machine carousel in editor preview                           */
/* ========================================================================== */
.machine-banner-preview-v311 .machine-banner-media {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 10px !important;
}
.machine-banner-preview-v311 .machine-banner-primary {
    width: min(100%, 620px);
    margin: 0 auto;
    grid-template-rows: auto auto !important;
    gap: 8px !important;
}
.machine-banner-preview-v311 .machine-banner-main-frame {
    width: 100%;
    height: clamp(270px, 25vw, 370px);
    min-height: 0 !important;
    max-height: 370px;
    padding: 10px !important;
    border: 1px solid rgba(79,83,88,.10);
    border-radius: 14px;
    background: #fff;
}
.machine-banner-preview-v311 .machine-banner-main-image {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}
.machine-banner-preview-v311 .machine-banner-thumbnails {
    display: none !important;
}
@media (max-width: 620px) {
    .machine-banner-preview-v311 .machine-banner-main-frame {
        height: clamp(215px, 64vw, 300px);
    }
}


/* ========================================================================== */
/* v3.16 - restored machine gallery in editor preview                         */
/* ========================================================================== */
.machine-banner-preview-v311 .machine-banner-media {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    align-content: start;
    gap: 12px !important;
}
.machine-banner-preview-v311 .machine-banner-primary {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-rows: auto auto !important;
    gap: 8px !important;
}
.machine-banner-preview-v311 .machine-banner-main-frame {
    width: 100%;
    height: clamp(310px, 29vw, 410px);
    min-height: 0 !important;
    max-height: 410px;
    padding: 8px !important;
    border: 1px solid rgba(79,83,88,.10);
    border-radius: 14px;
    background: #fff;
}
.machine-banner-preview-v311 .machine-banner-main-image {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}
.machine-banner-preview-v311 .machine-banner-controls {
    min-height: 44px;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.machine-banner-preview-v311 .machine-banner-thumbnails {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: 98px !important;
    gap: 9px !important;
    width: 100%;
    min-height: 0 !important;
}
.machine-banner-preview-v311 .machine-banner-thumb {
    width: 100%;
    min-height: 0 !important;
    overflow: hidden;
}
.machine-banner-preview-v311 .machine-banner-thumb.is-active { display: none !important; }
.machine-banner-preview-v311 .machine-banner-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
}
@media (max-width: 620px) {
    .machine-banner-preview-v311 .machine-banner-main-frame { height: clamp(220px, 64vw, 300px); }
    .machine-banner-preview-v311 .machine-banner-thumbnails { grid-auto-rows: 78px !important; }
}

/* v3.17 - official source machine gallery: adapt thumbnails to the number of
   supplied views and preserve the original image pixels in editor preview. */
.machine-banner-preview-v311 .machine-banner-thumbnails {
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)) !important;
}
.machine-banner-preview-v311 .machine-banner-main-image,
.machine-banner-preview-v311 .machine-banner-thumb img {
    image-rendering: auto;
}

/* ========================================================================== */
/* v3.18 - stable high-resolution machine banner editor preview               */
/* ========================================================================== */
.machine-banner-preview-v311 {
    overflow: visible !important;
    padding: clamp(16px, 2vw, 28px) !important;
}
.machine-banner-preview-v311 .machine-banner-dynamic {
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr) !important;
    gap: clamp(24px, 2.6vw, 42px) !important;
    align-items: start !important;
    overflow: visible !important;
}
.machine-banner-preview-v311 .machine-banner-media {
    width: 100%;
    min-width: 0;
    gap: 12px !important;
}
.machine-banner-preview-v311 .machine-banner-main-frame {
    width: 100%;
    height: clamp(360px, 31vw, 480px) !important;
    max-height: none !important;
    padding: 12px !important;
    overflow: hidden !important;
    box-sizing: border-box;
}
.machine-banner-preview-v311 .machine-banner-main-image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}
.machine-banner-preview-v311 .machine-banner-thumbnails {
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)) !important;
    grid-auto-rows: 105px !important;
    gap: 9px !important;
}
.machine-banner-preview-v311 .machine-banner-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}
.machine-banner-preview-v311 .machine-banner-features {
    grid-template-rows: none !important;
    grid-auto-rows: auto !important;
    gap: 14px !important;
    align-content: center !important;
    min-width: 0;
}
.machine-banner-preview-v311 .machine-banner-feature {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    gap: 14px !important;
}
.machine-banner-preview-v311 .machine-banner-feature-icon {
    width: 58px !important;
    height: 58px !important;
    object-fit: contain !important;
}
.machine-banner-preview-v311 .machine-banner-feature p {
    min-width: 0;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere;
}
@media (max-width: 1080px) {
    .machine-banner-preview-v311 .machine-banner-dynamic {
        grid-template-columns: 1fr !important;
    }
    .machine-banner-preview-v311 .machine-banner-main-frame {
        height: clamp(320px, 52vw, 450px) !important;
    }
    .machine-banner-preview-v311 .machine-banner-features {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        align-content: start !important;
    }
}
@media (max-width: 620px) {
    .machine-banner-preview-v311 { padding: 10px !important; }
    .machine-banner-preview-v311 .machine-banner-main-frame {
        height: clamp(240px, 70vw, 320px) !important;
    }
    .machine-banner-preview-v311 .machine-banner-thumbnails {
        grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)) !important;
        grid-auto-rows: 76px !important;
    }
    .machine-banner-preview-v311 .machine-banner-features {
        grid-template-columns: 1fr !important;
    }
}
/* v3.18: keep editor carousel thumbnails compact regardless of photo count. */
.machine-banner-preview-v311 .machine-banner-thumbnails {
    display: flex !important;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: 9px !important;
}
.machine-banner-preview-v311 .machine-banner-thumb {
    flex: 1 1 0;
    width: auto !important;
    max-width: 170px;
    height: 102px;
}
@media (max-width: 620px) {
    .machine-banner-preview-v311 .machine-banner-thumb { max-width: 31%; height: 74px; }
}

/* ========================================================================== */
/* v3.19 - compact inline Analysis editor                                     */
/* ========================================================================== */
.fraction-analysis-detail-v38 {
    padding: 9px 12px 12px !important;
}
.analysis-slot-fields-v319 {
    border-radius: 10px !important;
    padding: 10px 11px 11px !important;
}
.analysis-compact-meta-v319 {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e3e5;
}
.analysis-compact-meta-v319 .analysis-slot-id {
    min-width: 42px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    padding-inline: 8px;
    border-radius: 7px;
    color: var(--grey-deep);
    background: #eef0f2;
    font-family: Conthrax, Lato, sans-serif !important;
    font-size: 13px;
    font-weight: 900;
}
.analysis-slot-fields-v319 .analysis-result-head,
.analysis-slot-fields-v319 .analysis-result-row {
    gap: 8px !important;
}
.analysis-slot-fields-v319 .analysis-result-row-v38 {
    min-height: 40px !important;
}
.analysis-slot-fields-v319 .analysis-total-row-v38 {
    margin-top: 0 !important;
    border-radius: 0 0 7px 7px !important;
    border-top: 2px solid #cfd3d7 !important;
}
.analysis-slot-fields-v319 .analysis-total-row-v38 [data-analysis-total-percent] {
    color: var(--orange);
}
@media (max-width: 760px) {
    .analysis-compact-meta-v319 { align-items: center; }
}

/* ========================================================================== */
/* v3.20 - Analysis total-first alignment                                     */
/* ========================================================================== */
.analysis-slot-fields-v319 .analysis-total-row-v320 {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    border-bottom: 1px solid #686d73 !important;
    background: var(--grey) !important;
    color: #fff !important;
}
.analysis-slot-fields-v319 .analysis-total-row-v320 strong,
.analysis-slot-fields-v319 .analysis-total-row-v320 output {
    color: #fff !important;
    font-weight: 900 !important;
}
.analysis-slot-fields-v319 .analysis-total-row-v320 [data-analysis-total-percent] {
    color: #ff9860 !important;
}
.analysis-slot-fields-v319 .analysis-total-row-v320 + .analysis-result-rows .analysis-result-row-v38:first-child {
    border-top: 0 !important;
}

/* ========================================================================== */
/* v3.21 - aligned Analysis TOTAL row                                         */
/* ========================================================================== */
.analysis-slot-fields-v319 .analysis-total-row-v321 {
    display: grid !important;
    grid-template-columns: minmax(190px,1.45fr) minmax(112px,.72fr) minmax(88px,.48fr) minmax(76px,.42fr) 34px !important;
    gap: 10px !important;
    align-items: center !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #d8dcdf !important;
    border-radius: 0 !important;
    background: #e4e7e9 !important;
    color: var(--grey-deep) !important;
}
.analysis-slot-fields-v319 .analysis-total-row-v321 > * {
    min-width: 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    margin: 0 !important;
    padding: 0 8px !important;
    color: var(--grey-deep) !important;
    font-family: Lato, sans-serif !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    text-align: left !important;
}
.analysis-slot-fields-v319 .analysis-total-row-v321 [data-analysis-total-percent] {
    color: var(--orange) !important;
}
.analysis-slot-fields-v319 .analysis-total-row-v321 > :last-child {
    padding: 0 !important;
}
.analysis-slot-fields-v319 .analysis-total-row-v321 + .analysis-result-rows .analysis-result-row-v38:first-child {
    border-top: 0 !important;
}
@media (max-width: 700px) {
    .analysis-slot-fields-v319 .analysis-total-row-v321 {
        grid-template-columns: minmax(150px,1fr) 92px 74px 70px 34px !important;
    }
}
