: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%; }
}
