:root {
    color-scheme: light;
    --ink: #182033;
    --muted: #667085;
    --line: #e4e7ec;
    --surface: #ffffff;
    --canvas: #f5f7fb;
    --brand: #3e4ab8;
    --brand-dark: #2f398e;
    --brand-soft: #eef0ff;
    --success: #087a55;
    --success-soft: #e8f7f1;
    --danger: #b42318;
    --danger-soft: #fff0ee;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
a { color: inherit; }
.topbar { height: 72px; padding: 0 max(24px, calc((100vw - 1160px) / 2)); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); }
.brand { display: flex; gap: 11px; align-items: center; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: white; background: linear-gradient(145deg, #5967dc, #30398d); font-weight: 800; box-shadow: 0 7px 18px rgba(62,74,184,.24); }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); margin-top: 1px; }
.account { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: .9rem; }
.account a { color: var(--brand); font-weight: 700; text-decoration: none; }
.page { max-width: 1160px; margin: 0 auto; padding: 42px 24px 80px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.045em; margin-bottom: 8px; }
h2 { font-size: 1.12rem; letter-spacing: -.015em; margin-bottom: 6px; }
.eyebrow { display: block; color: var(--brand); font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; margin-bottom: 10px; }
.muted, .section-heading p, .dealership-card p { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 28px rgba(16,24,40,.055); }
.dealership-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; margin-bottom: 24px; }
.dealership-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 22px; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.dealership-card:hover { transform: translateY(-2px); border-color: #c7ccf6; box-shadow: 0 14px 34px rgba(16,24,40,.09); }
.dealership-card h2, .dealership-card p { margin-bottom: 3px; }
.card-icon { width: 44px; height: 44px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); border-radius: 13px; font-size: 1.3rem; }
.status { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; font-size: .78rem; font-weight: 750; }
.status-active { color: var(--success); background: var(--success-soft); }
.status-inactive { color: var(--danger); background: var(--danger-soft); }
.section-card { padding: 26px; margin-bottom: 22px; }
.compact-card { display: grid; gap: 16px; }
.section-heading { display: flex; align-items: start; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 20px; }
.section-heading p { margin-bottom: 0; }
.section-heading-actions { display: flex; flex-shrink: 0; align-items: center; gap: 10px; }
.info-popover { position: relative; }
.info-popover summary { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #c7ccf6; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-family: Georgia, serif; font-size: 1.05rem; font-weight: 800; cursor: pointer; list-style: none; user-select: none; }
.info-popover summary::-webkit-details-marker { display: none; }
.info-popover summary:hover { background: #dfe3ff; }
.info-popover summary:focus-visible { outline: 3px solid rgba(62,74,184,.22); outline-offset: 2px; }
.info-popover[open] summary { color: white; background: var(--brand); border-color: var(--brand); }
.info-popover-content { position: absolute; z-index: 8; top: 42px; right: 0; width: min(390px, calc(100vw - 48px)); padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 18px 45px rgba(16,24,40,.18); font-size: .88rem; line-height: 1.5; }
.info-popover-content h3 { margin: 0 0 10px; font-size: 1rem; }
.info-popover-content ol { margin: 0 0 12px; padding-left: 20px; }
.info-popover-content li + li { margin-top: 7px; }
.info-popover-content p { margin: 0; color: var(--muted); }
.field-label { display: flex; align-items: center; gap: 7px; }
.field-info { position: relative; display: inline-block; font-weight: 400; }
.field-info summary { width: 20px; height: 20px; display: inline-grid; place-items: center; border: 1px solid #c7ccf6; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-family: Georgia, serif; font-size: .75rem; font-weight: 800; cursor: pointer; list-style: none; }
.field-info summary::-webkit-details-marker { display: none; }
.field-info summary:focus-visible { outline: 3px solid rgba(62,74,184,.22); outline-offset: 2px; }
.field-info > span { position: absolute; z-index: 12; left: 50%; bottom: calc(100% + 8px); width: 260px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #172033; color: white; box-shadow: 0 12px 30px rgba(16,24,40,.22); font-size: .78rem; font-weight: 500; line-height: 1.4; transform: translateX(-50%); }
.composition-heading { margin: 4px 0 -4px; font-size: 1rem; }
.composition-overrides { border: 1px solid var(--line); border-radius: 12px; background: #f8f9fc; }
.composition-overrides > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; color: var(--ink); font-weight: 750; cursor: pointer; }
.composition-overrides > p { padding: 0 15px; }
.composition-table-wrap { overflow-x: auto; padding: 0 15px 15px; }
.composition-table { width: 100%; min-width: 1600px; border-collapse: collapse; font-size: .78rem; }
.composition-table th, .composition-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.composition-table th { white-space: nowrap; color: var(--muted); }
.composition-table th .field-info { margin-left: 3px; vertical-align: middle; }
.composition-table input[type="number"] { min-width: 82px; min-height: 38px; padding: 7px 8px; }
.composition-preview { margin: 0 15px 15px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.composition-preview-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.composition-preview-toolbar > label:first-child { min-width: 230px; }
.composition-preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.composition-preview-item { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #f8f9fc; }
.composition-preview-stage { aspect-ratio: 4 / 3; overflow: hidden; background: #101828; }
.composition-preview-stage canvas, .composition-preview-stage img { width: 100%; height: 100%; display: block; object-fit: cover; }
.composition-preview-stage canvas[hidden], .composition-preview-stage img[hidden] { display: none; }
.composition-preview-caption { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; font-size: .78rem; }
.composition-preview-caption span { color: var(--muted); text-align: right; }
.quality-review-note { margin: 12px 0; padding: 10px 12px; border: 1px solid #f2c94c; border-radius: 10px; background: #fff8db; color: #725400; }
.correction-workspace { display: grid; gap: 18px; }
.correction-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.correction-toolbar label { display: flex; align-items: center; gap: 8px; }
.correction-toolbar input[type="range"], .correction-zoom-toolbar input[type="range"] { width: min(180px, 32vw); }
.correction-zoom-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8f9fc; }
.correction-zoom-toolbar label { display: flex; align-items: center; gap: 8px; }
.correction-zoom-step { min-width: 44px; padding-inline: 12px; font-size: 1.2rem; }
.correction-tool-hint { margin-left: auto; font-size: .8rem; }
.correction-editor-status { min-height: 1.25em; margin: -8px 0; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; }
.checkbox-row input { width: auto; margin-top: 3px; }
.checkbox-row span { display: grid; gap: 4px; }
.correction-mode.active { box-shadow: 0 0 0 3px rgba(41, 98, 255, .18); }
.correction-canvas-wrap { min-height: 360px; max-height: 72vh; overflow: auto; overscroll-behavior: contain; border: 1px solid #252d3b; border-radius: 14px; background: #141923; line-height: 0; -webkit-overflow-scrolling: touch; }
.correction-canvas-stage { position: relative; margin: auto; }
#correction-canvas { display: block; cursor: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#correction-canvas.is-pan { cursor: grab; }
#correction-canvas.is-panning { cursor: grabbing; }
#correction-canvas.is-magic { cursor: crosshair; }
.correction-vehicle-settings { display: grid; gap: 16px; padding-top: 8px; }
.correction-vehicle-settings h2 { margin: 0; }
.correction-result-preview { max-height: none; background: #111; }
.correction-result-preview canvas { display: block; width: 100%; height: auto; }
#correction-form { display: grid; gap: 16px; }
#correction-form > label { display: grid; gap: 7px; }
@media (max-width: 760px) {
    .correction-canvas-wrap { min-height: 300px; max-height: 66vh; }
    .correction-tool-hint { width: 100%; margin-left: 0; }
    .correction-toolbar input[type="range"], .correction-zoom-toolbar input[type="range"] { width: min(160px, 45vw); }
}
.compact-toggle { min-width: 76px; }
.count { min-width: 30px; height: 30px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); border-radius: 999px; font-weight: 750; }
.breadcrumb { display: flex; gap: 8px; color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
.breadcrumb a { color: var(--brand); }
label { display: grid; gap: 7px; color: #344054; font-size: .84rem; font-weight: 650; }
input, select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cfd4dc; border-radius: 10px; background: white; color: var(--ink); font: inherit; outline: none; }
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(62,74,184,.12); }
input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: end; justify-content: flex-end; }
.inline-form, .item-row { display: flex; align-items: end; gap: 14px; }
.grow { flex: 1; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 13px; background: #f8f9fc; border-radius: 11px; }
.check-row span, .check-row small { display: block; }
.check-row small { color: var(--muted); font-weight: 450; margin-top: 3px; }
.stack { display: grid; gap: 12px; }
.item-row { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fcfcfd; }
.add-row, .add-panel { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.add-panel { background: #f8f9fc; padding: 18px; border-radius: 13px; border-top: 0; }
.toggle { display: flex; align-items: center; gap: 7px; min-height: 44px; }
.user-identity { min-width: 220px; }
.user-identity strong, .user-identity span { display: block; }
.user-identity span { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 720; cursor: pointer; white-space: nowrap; }
.button-primary { background: var(--brand); color: white; box-shadow: 0 5px 13px rgba(62,74,184,.2); }
.button-primary:hover { background: var(--brand-dark); }
.button-secondary { color: var(--brand); background: var(--brand-soft); }
.button-danger { color: var(--danger); background: var(--danger-soft); }
.button-danger:hover { background: #ffe1dd; }
.button-quiet { background: transparent; color: var(--muted); padding-inline: 6px; }
.button-wide { width: 100%; }
.flash, .field-error { padding: 13px 16px; border-radius: 11px; margin-bottom: 20px; font-weight: 650; }
.flash-success { color: var(--success); background: var(--success-soft); }
.flash-error, .field-error { color: var(--danger); background: var(--danger-soft); }
.empty { padding: 20px; color: var(--muted); text-align: center; }
.item-row span { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.export-error { display: block; margin: 8px 0 0; padding: 8px 10px; }
.configuration-link { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 26px; margin-bottom: 22px; color: inherit; text-decoration: none; }
.configuration-link h2 { margin: 2px 0 6px; }
.configuration-link p { margin: 0; color: var(--muted); }
.credit-summary { display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: center; gap: 20px; padding: 20px 26px; margin-bottom: 22px; }
.credit-summary div { display: grid; gap: 3px; }
.credit-summary strong { font-size: 1.45rem; }
.credit-summary div span:not(.eyebrow) { color: var(--muted); font-size: .82rem; }
.service-status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.service-status-grid div { display: grid; gap: 5px; padding: 16px; background: #f8f9fc; border-radius: 12px; }
.service-status-grid span, .credit-row span { color: var(--muted); font-size: .82rem; }
.credit-row { display: grid; grid-template-columns: minmax(260px, 1fr) 180px auto; align-items: end; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; }
.credit-row .grow { display: grid; gap: 5px; align-self: center; }
.credit-account { display: grid; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.credit-account .credit-row { border: 0; border-radius: 0; }
.credit-topup-row { display: grid; grid-template-columns: 150px minmax(240px, 1fr) auto; align-items: end; gap: 14px; padding: 14px; background: var(--brand-soft); border-top: 1px solid var(--line); }
.grant-row { display: grid; grid-template-columns: 70px minmax(240px, 1fr) auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.grant-row > strong { color: var(--success); font-size: 1.35rem; }
.grant-row div { display: grid; gap: 4px; }
.grant-row small { color: var(--muted); }
.credit-inline { display: flex; justify-content: space-between; gap: 18px; margin: -10px 0 22px; padding: 13px 16px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-dark); }
.credit-inline span { color: var(--muted); }
.subnav { display: flex; gap: 8px; margin: -10px 0 22px; position: sticky; top: 82px; z-index: 3; }
.subnav a { background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 999px; padding: 9px 15px; box-shadow: 0 5px 15px rgba(16,24,40,.07); text-decoration: none; }
.background-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; margin-bottom: 16px; }
.asset-card { border: 1px solid var(--line); border-radius: 16px; padding: 13px; display: grid; gap: 12px; background: #fbfcff; }
.asset-card > img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 11px; background: #e9ebf4; }
.asset-card > img.transparent-preview { object-fit: contain; background-color: #f4f5f7; background-image: linear-gradient(45deg, #e4e7ec 25%, transparent 25%), linear-gradient(-45deg, #e4e7ec 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e4e7ec 75%), linear-gradient(-45deg, transparent 75%, #e4e7ec 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.choice-group { border: 1px solid var(--line); border-radius: 12px; padding: 11px; display: grid; gap: 7px; }
.choice-group legend { color: var(--muted); padding: 0 5px; font-size: .82rem; font-weight: 700; }
.choice-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.asset-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.standard-action { margin: -4px 0 16px; }
.step-stack { display: grid; gap: 12px; }
.step-card { display: grid; grid-template-columns: 145px minmax(260px, 1fr) 180px; align-items: end; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.order-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.step-main { display: grid; gap: 7px; }
.step-options { display: flex; flex-wrap: wrap; gap: 8px; align-self: center; }
.silhouette-field a { display: block; font-size: .78rem; margin: 3px 0; color: var(--brand); }
.step-card > .button { justify-self: end; }
.sequence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 4px 0 28px; }
.sequence-panel { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #f8f9fc; }
.sequence-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.sequence-heading h3 { margin: 2px 0 0; font-size: 1.02rem; }
.sequence-hint { color: var(--muted); font-size: .74rem; }
.sequence-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sequence-list:empty::after { content: "Keine Orientierung ausgewählt"; padding: 18px; border: 1px dashed #cfd4df; border-radius: 11px; color: var(--muted); text-align: center; font-size: .82rem; }
.sequence-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 48px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 3px 10px rgba(16,24,40,.035); }
.sequence-position { min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 4px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-dark); font-size: .78rem; }
.sequence-label { overflow: hidden; font-size: .85rem; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.sequence-controls { display: flex; gap: 5px; }
.sequence-button { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #cfd4df; border-radius: 8px; background: white; color: var(--brand); cursor: pointer; font: 700 .72rem/1 inherit; }
.sequence-button:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); }
.sequence-button:disabled { cursor: default; opacity: .28; }
.sequence-note { margin: 12px 2px 0; font-size: .76rem; line-height: 1.45; }
.compact-heading { margin-top: 8px; }
.orientation-order-row { grid-template-columns: 120px minmax(280px, 1fr) minmax(180px, auto); align-items: center; }
.orientation-order-state { display: grid; gap: 7px; align-self: stretch; align-content: center; }
.order-state-badge { display: block; padding: 7px 9px; border-radius: 8px; background: #f2f4f7; color: #475467; font-size: .75rem; font-weight: 750; text-align: center; }
.orientation-order-row > .step-options { grid-column: 2 / 4; }
.orientation-page-heading { align-items: center; }
.orientation-page-heading > div:first-child { max-width: 720px; }
.orientation-summary { display: grid; grid-template-columns: repeat(3, minmax(90px, 1fr)); gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.78); box-shadow: 0 8px 24px rgba(16,24,40,.04); }
.orientation-summary div { display: grid; justify-items: center; gap: 2px; min-width: 92px; padding: 10px 12px; border-radius: 11px; background: white; }
.orientation-summary strong { color: var(--brand-dark); font-size: 1.25rem; }
.orientation-summary span { color: var(--muted); font-size: .72rem; }
.orientation-category-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; position: sticky; top: 82px; z-index: 4; margin-bottom: 28px; }
.orientation-category-nav a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.94); color: var(--ink); box-shadow: 0 7px 20px rgba(16,24,40,.06); text-decoration: none; backdrop-filter: blur(12px); }
.orientation-category-nav a:hover { color: var(--brand); border-color: #c7ccf6; transform: translateY(-1px); }
.orientation-category-nav strong { min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .78rem; }
.orientation-section { scroll-margin-top: 150px; margin-bottom: 34px; }
.orientation-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.orientation-section-heading > div { display: flex; align-items: center; gap: 12px; }
.orientation-section-heading h2 { margin: 0 0 2px; font-size: 1.3rem; }
.orientation-section-heading p { margin: 0; color: var(--muted); font-size: .86rem; }
.orientation-category-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; font-size: 1.3rem; font-weight: 800; }
.orientation-category-exterior { background: #e8f7f1; color: #087a55; }
.orientation-category-interior { background: #eef0ff; color: var(--brand); }
.orientation-category-detail { background: #fff4df; color: #a15c00; }
.orientation-category-special { background: #f8eefe; color: #8b35a8; }
.orientation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.orientation-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 8px 24px rgba(16,24,40,.05); transition: border-color .15s, box-shadow .15s, transform .15s; }
.orientation-card:hover { border-color: #c7ccf6; box-shadow: 0 14px 30px rgba(16,24,40,.08); transform: translateY(-1px); }
.orientation-card-inactive { opacity: .68; }
.orientation-preview { height: 196px; display: grid; place-items: center; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 45%, #343b54 0, #1c2338 68%, #151a2a 100%); }
.orientation-preview::after { content: ""; position: absolute; inset: auto 10% 18px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent); }
.orientation-preview img { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 8px 13px rgba(0,0,0,.28)); }
.orientation-preview > span:not(.orientation-sequence) { color: rgba(255,255,255,.4); font-size: 3.5rem; }
.orientation-sequence { position: absolute; z-index: 1; top: 13px; left: 13px; min-width: 33px; height: 33px; display: grid; place-items: center; padding: 0 8px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; color: white; background: rgba(15,23,42,.7); font-size: .82rem; font-weight: 800; backdrop-filter: blur(8px); }
.orientation-card-body { display: grid; gap: 11px; padding: 18px 18px 16px; }
.orientation-card-title { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.orientation-card-title h3 { margin: 0 0 4px; font-size: 1.07rem; letter-spacing: -.01em; }
.orientation-card-title code { color: var(--muted); font-size: .72rem; }
.orientation-card-body > p { min-height: 2.65em; margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.orientation-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.orientation-badges span { padding: 5px 8px; border-radius: 999px; background: #f2f4f7; color: #475467; font-size: .7rem; font-weight: 720; }
.orientation-settings { border-top: 1px solid var(--line); }
.orientation-settings > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; color: var(--brand); background: #fbfcff; cursor: pointer; font-size: .82rem; font-weight: 750; list-style: none; }
.orientation-settings > summary::-webkit-details-marker, .orientation-create > summary::-webkit-details-marker { display: none; }
.orientation-settings[open] > summary { background: var(--brand-soft); }
.orientation-settings > summary span, .orientation-create > summary > span:last-child { transition: transform .15s; }
.orientation-settings[open] > summary span, .orientation-create[open] > summary > span:last-child { transform: rotate(180deg); }
.orientation-settings-body { display: grid; gap: 17px; padding: 18px; border-top: 1px solid var(--line); }
.silhouette-upload small { color: var(--muted); font-weight: 450; }
.orientation-create { overflow: hidden; margin-top: 42px; }
.orientation-create > summary { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; cursor: pointer; list-style: none; }
.orientation-create > summary > span:first-child { display: flex; align-items: center; gap: 13px; }
.orientation-create > summary strong, .orientation-create > summary small { display: block; }
.orientation-create > summary small { margin-top: 3px; color: var(--muted); }
.orientation-create > form { padding: 22px; border-top: 1px solid var(--line); background: #fbfcff; }
.job-list { display: grid; gap: 10px; }
.job-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.job-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 13px; color: inherit; text-decoration: none; }
.job-row:hover { border-color: #c7ccf6; background: #fbfcff; }
.job-row strong, .job-row span { display: block; }
.job-row div span { margin-top: 4px; color: var(--muted); font-size: .82rem; }
.job-delete-form { margin: 0; }
.admin-dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 20px; color: var(--ink); background: var(--surface); box-shadow: 0 28px 80px rgba(16,24,40,.28); }
.admin-dialog::backdrop { background: rgba(15,23,42,.58); backdrop-filter: blur(4px); }
.dialog-content { padding: 28px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: 1.45rem; margin-bottom: 6px; }
.dialog-heading p { margin: 0; color: var(--muted); }
.dialog-close { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font: 600 1.5rem/1 inherit; cursor: pointer; }
.dialog-close:hover { background: #dfe3ff; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.photo-review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 18px; }
.photo-review-card { padding: 18px; }
.photo-variants { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px; }
.photo-variants-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.photo-variants-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.photo-variants-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.photo-variants-benchmark { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.benchmark-variant { padding: 8px; border: 2px solid #c7ccf6; border-radius: 12px; background: var(--brand-soft); }
.photo-variants a { color: var(--ink); text-decoration: none; font-size: .8rem; font-weight: 700; }
.photo-variants img, .photo-placeholder { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #e9ebf4; border-radius: 10px; }
.photo-variants a span { display: block; margin-top: 5px; }
.photo-download-variant { min-width: 0; }
.photo-image-link { display: block; }
.photo-variant-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; }
.photo-variant-caption > span { font-size: .8rem; font-weight: 700; }
.download-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: #eef0ff; color: var(--brand) !important; font-size: 1.1rem !important; line-height: 1; text-decoration: none; }
.download-icon:hover { background: #dfe3ff; }
.processing-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.processing-actions-single { grid-template-columns: 1fr; }
.processing-actions form { margin: 0; }
.manual-photo-form { display: grid; grid-template-columns: 1fr 1.25fr 1.25fr; gap: 16px; align-items: end; }
.manual-photo-form small { color: var(--muted); font-weight: 450; }
.manual-photo-form .check-row { align-self: stretch; }
.photo-placeholder { display: grid; place-items: center; padding: 16px; color: var(--muted); text-align: center; }
button:disabled { cursor: not-allowed; opacity: .5; }
.login-shell { min-height: calc(100vh - 194px); display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(40px, 8vw, 110px); }
.login-copy h1 { max-width: 650px; font-size: clamp(2.5rem, 6vw, 4.8rem); }
.login-copy p { max-width: 580px; color: var(--muted); font-size: 1.12rem; line-height: 1.65; }
.login-card { padding: 30px; display: grid; gap: 20px; }
.quality-count { padding: 9px 14px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-weight: 800; }
.push-notification-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; margin-bottom: 22px; }
.push-notification-card h2 { margin: 3px 0 7px; }
.push-notification-card p { max-width: 760px; margin-bottom: 0; }
.push-status { min-height: 1.4em; margin-top: 8px !important; color: var(--brand); font-weight: 700; }
.push-actions { display: flex; flex: 0 0 auto; gap: 10px; }
.quality-review-list { display: grid; gap: 20px; margin-bottom: 28px; }
.quality-queue-card { padding: 24px; }
.quality-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.quality-card-heading h2, .quality-card-heading p { margin-bottom: 4px; }
.quality-card-heading p { color: var(--muted); }
.quality-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quality-comparison a { color: var(--ink); text-decoration: none; font-size: .82rem; font-weight: 750; }
.quality-comparison img { width: 100%; aspect-ratio: 4/3; object-fit: contain; border-radius: 12px; background: #e9ebf4; }
.quality-comparison span { display: block; margin-top: 6px; }
.quality-diagnostics { margin: 18px 0; padding: 14px 16px; border-radius: 12px; background: #fff8db; color: #725400; }
.quality-diagnostics p { margin: 5px 0; line-height: 1.45; }
.quality-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.quality-actions form { margin: 0; }
.operator-create-form { margin-bottom: 20px; }
.empty-state { padding: 42px; text-align: center; }
.empty-state p { margin-bottom: 0; color: var(--muted); }
.api-filter-form { display: grid; grid-template-columns: 1fr 1fr 2fr auto; gap: 14px; align-items: end; }
.api-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.api-kpi { padding: 22px; display: grid; gap: 5px; }
.api-kpi span { color: var(--muted); font-weight: 700; font-size: .88rem; }
.api-kpi strong { font-size: 2rem; line-height: 1.1; }
.api-kpi small { color: var(--muted); }
.table-scroll { overflow-x: auto; }
.api-table { width: 100%; border-collapse: collapse; }
.api-table th, .api-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.api-table th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.api-table tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 820px) {
    .account > span { display: none; }
    .page { padding: 28px 16px 60px; }
    .login-shell { grid-template-columns: 1fr; gap: 20px; }
    .login-copy h1 { font-size: 2.6rem; }
    .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .item-row, .inline-form { align-items: stretch; flex-direction: column; }
    .item-row .button, .inline-form .button { width: 100%; }
    .user-identity { min-width: 0; }
    .configuration-link { align-items: stretch; flex-direction: column; }
    .credit-summary, .service-status-grid, .credit-row, .credit-topup-row, .grant-row { grid-template-columns: 1fr; }
    .credit-inline { flex-direction: column; }
    .subnav { overflow-x: auto; top: 76px; }
    .subnav a { white-space: nowrap; }
    .step-card { grid-template-columns: 1fr; }
    .sequence-grid { grid-template-columns: 1fr; }
    .orientation-order-row > .step-options { grid-column: auto; }
    .background-grid { grid-template-columns: 1fr; }
    .job-entry { grid-template-columns: 1fr; }
    .job-row { grid-template-columns: 1fr; }
    .job-delete-form .button { width: 100%; }
    .page-heading { align-items: stretch; flex-direction: column; }
    .page-heading > .button { width: 100%; }
    .dialog-content { padding: 22px; }
    .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
    .dialog-actions .button { width: 100%; }
    .photo-review-grid { grid-template-columns: 1fr; }
    .photo-variants-three { grid-template-columns: 1fr; }
    .photo-variants-two { grid-template-columns: 1fr; }
    .photo-variants-four { grid-template-columns: 1fr; }
    .processing-actions { grid-template-columns: 1fr; }
    .manual-photo-form { grid-template-columns: 1fr; }
    .orientation-summary { width: 100%; }
    .orientation-category-nav { display: flex; overflow-x: auto; top: 76px; }
    .orientation-category-nav a { min-width: 160px; }
    .orientation-grid { grid-template-columns: 1fr; }
    .orientation-preview { height: 180px; }
    .quality-card-heading, .quality-actions, .push-notification-card, .push-actions { align-items: stretch; flex-direction: column; }
    .quality-comparison { grid-template-columns: 1fr; }
    .quality-actions .button, .quality-actions form { width: 100%; }
    .api-filter-form, .api-kpi-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .topbar { padding-inline: 16px; }
    .account { gap: 8px; }
    .account > a { display: none; }
    .account .button { padding-inline: 8px; }
    .orientation-summary { grid-template-columns: 1fr; }
    .orientation-summary div { grid-template-columns: auto 1fr; justify-items: start; align-items: baseline; }
    .orientation-card-title { flex-direction: column; }
}
