/* Syntegon look for the prebuilt Mobile Dialoge bundle, phone first. Same language as the DF skin
   (branding/syntegon.css): white and light grey surfaces, slate ink text (#28323c), Syntegon green-500 (#15875c)
   as the action colour, green-600 (#00553a) for green text, green-25/50 (#e6f6f1 / #ccf2e6) as light shades.
   The mint accent (#00f0a4) is for dark backgrounds only, so it does not appear here. One font: Inter (OFL, the
   closest free face to syntegon.com's own URW "Syntegon"), headings Medium/SemiBold, syntegon.com radii (--syn-radius-*), no caps.
   Inter's tabular figures widen the hyphen in batch numbers (GV-261019-1), so digits stay proportional.
   The app is a minified build, so everything overrides it from outside: CSS-module classes
   are matched on their stable prefix ([class*="_menuBtn_"]), antd on its public class names, and
   inline styles that the bundle sets need !important. Logo and primary colour (#15875c) come from
   the DF app-config at runtime. Template: the previous customer demo's skin. */

/* One variable file, weights 300-700 are real; size-adjust brings the wide Inter close to the layout's width */
@font-face {
  font-family: "Syntegon Text";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  size-adjust: 95%;
  src: url("./Inter-latin.woff2") format("woff2");
}

:root {
  --syn-ink: #28323c;
  --syn-text-2: #4e5761;
  --syn-muted: #7d848b;
  --syn-line: #e1e1e1;
  --syn-field: #c6c9cc;
  --syn-tile: #f0f1f2;
  --syn-surface: #f5f6f7;
  --syn-mist: #e6f6f1;
  --syn-mist-line: #ccf2e6;
  --syn-accent: #15875c;
  --syn-green: #15875c;
  --syn-green-text: #00553a;
  /* rounder UI, same tokens as branding/syntegon.css (README "Brand tokens"; Simon 2026-11-06, corrected: pills and 16px
     were too round): cards/panels 12, dialogs 12, fields 8 (also small icon tiles), buttons 8, chips/tags 12 */
  --syn-radius-card: 12px;
  --syn-radius-modal: 12px;
  --syn-radius-input: 8px;
  --syn-radius-button: 8px;
  --syn-radius-tag: 12px;
  --syn-ring: 0 0 0 3px rgba(21, 135, 92, 0.2);
  --syn-display: "Syntegon Text", Arial, sans-serif;
  --font-sans: "Syntegon Text", Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  /* codes and quantities: the text face instead of a monospace */
  --font-mono: "Syntegon Text", Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --primary-text-color: var(--syn-ink);
  --secondary-text-color: var(--syn-text-2);
  --label-font-color: var(--syn-text-2);
  --border-color: var(--syn-field);
  --app-background: var(--syn-surface);
  --login-bg: var(--syn-surface);
}

/* The bundle derives a light tint from the primary colour and writes it inline on <html>; the
   Syntegon green-25 replaces it. !important here takes precedence over that inline value. */
html {
  --primary-color-light: #e6f6f1 !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-variant-numeric: normal;
  font-feature-settings: normal;
  color: var(--syn-ink);
  background: var(--syn-surface);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

/* antd sets its font through low-specificity :where() rules; this outranks them */
html body [class*="ant-"]:not(.anticon) {
  font-family: var(--font-sans);
}

.mono,
.mono-tabular {
  font-variant-numeric: normal;
  font-feature-settings: normal;
  letter-spacing: 0;
}

/* No caps anywhere (demo style rule) */
#root *,
.ant-modal *,
.ant-select-dropdown * {
  text-transform: none !important;
}

button,
a,
input,
[role="button"],
.ant-select-selector {
  touch-action: manipulation;
}

/* ---------- Shell ---------- */

[class*="_shell_"] {
  background: var(--syn-surface);
  overflow-x: hidden;
}

[class*="_content_"] {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

[class*="_footer_"] {
  padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: #fff;
  border-top: 1px solid var(--syn-line);
}

/* ---------- App bar ---------- */

[class*="_appbar_"] {
  height: calc(64px + env(safe-area-inset-top));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(8px, env(safe-area-inset-right));
  gap: 12px;
  background: #fff;
  box-shadow: none;
  border-bottom: 1px solid var(--syn-line);
}

[class*="_appbarLogoBtn_"] {
  flex: none;
  min-height: 44px;
  padding: 0;
}

[class*="_appbarLogoTenant_"] {
  height: 24px;
}

[class*="_appbarTitle_"] {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid var(--syn-mist-line);
  font-family: var(--syn-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--syn-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[class*="_appbarRight_"] {
  flex: none;
  gap: 2px;
}

/* Language toggle: one quiet square chip with the current language; 44px hit area */
[class*="_appbarLang_"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 36px;
  margin: 4px 2px;
  padding: 0 10px;
  border: 1px solid var(--syn-field);
  border-radius: var(--syn-radius-button);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--syn-ink);
}

[class*="_appbarLang_"]::after {
  content: "";
  position: absolute;
  inset: -5px -3px;
}

[class*="_appbarLang_"] span {
  display: none;
}

[class*="_appbarLang_"]:active {
  background: var(--syn-surface);
  border-color: var(--syn-green);
}

[class*="_appbarUser_"] {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--syn-text-2);
  gap: 0;
}

[class*="_appbarLogout_"] {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--syn-radius-button);
  font-size: 18px;
  color: var(--syn-ink);
}

[class*="_appbarLogout_"]:active {
  background: var(--syn-surface);
}

/* Phones: the user's name is the first thing to give way; logout keeps its accessible label */
@media (max-width: 479px) {
  [class*="_appbarUser_"] {
    font-size: 0;
  }
}

/* ---------- Section labels & lists ---------- */

[class*="_sectionLabel_"] {
  padding: 22px 20px 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--syn-text-2);
}

[class*="_menuList_"] {
  gap: 8px;
  padding: 0 16px 8px;
}

[class*="_menuBtn_"] {
  gap: 14px;
  min-height: 68px;
  padding: 10px 14px 10px 12px;
  border: 1px solid var(--syn-line);
  border-radius: var(--syn-radius-card);
  background: #fff;
  box-shadow: none;
  font-family: var(--font-sans);
  color: var(--syn-ink);
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

[class*="_menuBtn_"]:not(:disabled):active {
  background: var(--syn-surface);
  border-color: var(--syn-green);
}

[class*="_menuBtn_"]:focus-visible {
  outline: none;
  border-color: var(--syn-green);
  box-shadow: var(--syn-ring);
}

[class*="_menuLabel_"] b {
  font-size: 16px;
  font-weight: 600;
  color: var(--syn-ink);
  line-height: 1.3;
}

[class*="_menuLabel_"] span {
  margin-top: 2px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--syn-text-2);
}

[class*="_iconTile_"] {
  border-radius: var(--syn-radius-input);
  background: var(--syn-mist);
  color: var(--syn-green-text);
}

[class*="_chev_"] {
  color: var(--syn-green-text);
}

/* ---------- Start screen ("Was möchtest du tun?") ----------
   The two entry cards are the only menu buttons the bundle renders with min-height 96px. */

[class*="_sectionLabel_"]:has(+ [class*="_menuList_"] > [class*="_menuBtn_"][style*="min-height: 96px"]) {
  position: relative;
  padding: 34px 20px 30px;
  font-family: var(--syn-display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.15;
  color: var(--syn-ink);
}

/* Eyebrow over the question, and a short green rule under it */
[class*="_sectionLabel_"]:has(+ [class*="_menuList_"] > [class*="_menuBtn_"][style*="min-height: 96px"])::before {
  content: "Syntegon Crailsheim · Vial-Linie ALF";
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--syn-green-text);
}

[class*="_sectionLabel_"]:has(+ [class*="_menuList_"] > [class*="_menuBtn_"][style*="min-height: 96px"])::after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: 16px;
  width: 40px;
  height: 2px;
  background: var(--syn-accent);
}

[class*="_menuList_"]:has(> [class*="_menuBtn_"][style*="min-height: 96px"]) {
  gap: 12px;
  padding: 0 16px 24px;
}

[class*="_menuBtn_"][style*="min-height: 96px"] {
  position: relative;
  min-height: 128px !important;
  padding: 20px 16px 20px 18px;
  gap: 16px;
  border: 1px solid var(--syn-line);
  border-radius: var(--syn-radius-card);
  background: #fff;
  overflow: hidden;
}

/* A green edge on the left, the Syntegon primary */
[class*="_menuBtn_"][style*="min-height: 96px"]::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--syn-accent);
}

[class*="_menuBtn_"][style*="min-height: 96px"] > [class*="_iconTile_"] {
  width: 56px !important;
  height: 56px !important;
  font-size: 23px !important;
  border-radius: var(--syn-radius-modal);
  color: #fff;
  background: var(--syn-green);
}

[class*="_menuBtn_"][style*="min-height: 96px"] [class*="_menuLabel_"] b {
  font-family: var(--syn-display);
  font-size: 21px !important;
  font-weight: 600;
  line-height: 1.15;
  color: var(--syn-ink);
}

[class*="_menuBtn_"][style*="min-height: 96px"] [class*="_menuLabel_"] span {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.45;
}

[class*="_menuBtn_"][style*="min-height: 96px"] > [class*="_chev_"] {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 1px solid var(--syn-mist-line);
  border-radius: var(--syn-radius-button);
  font-size: 13px;
  color: var(--syn-ink);
  background: #fff;
}

[class*="_menuBtn_"][style*="min-height: 96px"]:not(:disabled):active > [class*="_chev_"] {
  background: var(--syn-green);
  border-color: var(--syn-green);
  color: #fff;
}

/* ---------- Dialog header ---------- */

[class*="_dialogHeader_"] {
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--syn-line);
}

[class*="_backBtn_"] {
  width: 44px;
  height: 44px;
  border-color: var(--syn-field);
  border-radius: var(--syn-radius-button);
  font-size: 16px;
  color: var(--syn-ink);
}

[class*="_backBtn_"]:active {
  background: var(--syn-surface);
  border-color: var(--syn-green);
}

[class*="_dialogTitle_"] {
  font-family: var(--syn-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--syn-ink);
}

[class*="_dialogSub_"] {
  margin-top: 2px;
  font-size: 13px;
  color: var(--syn-text-2);
}

/* ---------- Buttons ---------- */

[class*="_primaryBtn_"] {
  height: 54px;
  border-radius: var(--syn-radius-button);
  background: var(--syn-green);
  font-family: var(--font-sans);
  font-size: 16.5px;
  font-weight: 600;
  box-shadow: none;
}

[class*="_primaryBtn_"]:not(:disabled):active {
  background: var(--syn-green-text);
}

[class*="_outlineBtn_"] {
  min-height: 52px;
  height: auto;
  border-color: var(--syn-field);
  border-radius: var(--syn-radius-button);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--syn-ink);
}

[class*="_outlineBtn_"]:active {
  background: var(--syn-surface);
  border-color: var(--syn-green);
}

/* ---------- Scan screen ---------- */

[class*="_scanWrap_"] {
  justify-content: flex-start;
  padding: 32px max(20px, env(safe-area-inset-right)) 24px max(20px, env(safe-area-inset-left));
}

[class*="_scanWrap_"] > [class*="_iconTileLg_"] {
  width: 84px;
  height: 84px;
  font-size: 36px;
  border-radius: var(--syn-radius-modal);
  margin-bottom: 20px !important;
  background: var(--syn-green);
  color: #fff;
}

[class*="_scanWrap_"] > h3 {
  font-family: var(--syn-display);
  font-size: 25px !important;
  font-weight: 500 !important;
  color: var(--syn-ink);
}

[class*="_scanHint_"] {
  max-width: 34ch;
  font-size: 15px;
  color: var(--syn-text-2);
  margin-bottom: 24px;
}

/* The scan field is an unclassed div holding the barcode icon and the input */
[class*="_scanWrap_"] > div:has(> input) {
  height: 56px !important;
  border-radius: var(--syn-radius-input) !important;
  border-color: var(--syn-field) !important;
  background: #fff !important;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

[class*="_scanWrap_"] > div:has(> input:focus) {
  border-color: var(--syn-green) !important;
  box-shadow: var(--syn-ring);
}

[class*="_scanWrap_"] > div > input {
  min-width: 0;
  height: 100%;
  font-size: 18px !important;
}

/* "Beispiele aus dem Lager" chips */
[class*="_scanWrap_"] button[style*="border-radius: var(--radius-full)"] {
  min-height: 44px;
  padding: 0 14px !important;
  border-radius: var(--syn-radius-tag) !important;
  border-color: var(--syn-field) !important;
  background: #fff !important;
  color: var(--syn-ink) !important;
}

[class*="_scanWrap_"] button[style*="border-radius: var(--radius-full)"]:active {
  border-color: var(--syn-green) !important;
  color: var(--syn-green-text) !important;
}

/* ---------- Info blocks, notes ---------- */

[class*="_infoBlock_"] {
  border-color: var(--syn-line);
  border-radius: var(--syn-radius-card);
  box-shadow: none;
}

[class*="_infoKey_"] {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--syn-text-2);
}

[class*="_infoVal_"] {
  min-width: 0;
  overflow-wrap: anywhere;
}

[class*="_note_"] {
  border-radius: var(--syn-radius-card);
  font-size: 14.5px;
}

[class*="_noteInfo_"] {
  background: #fff !important;
  border-color: var(--syn-mist-line) !important;
}

/* ---------- Text and quantity fields ---------- */

div:has(> input[inputmode="decimal"]) {
  border-radius: var(--syn-radius-input) !important;
  background: #fff;
}

div:has(> input[inputmode="decimal"]:focus) {
  border-color: var(--syn-green) !important;
  box-shadow: var(--syn-ring);
}

input[inputmode="decimal"] {
  min-width: 0;
  height: 100%;
}

html body .ant-input-affix-wrapper,
html body .ant-input {
  border-radius: var(--syn-radius-input);
}

html body .ant-input-affix-wrapper-lg {
  min-height: 52px;
  font-size: 16px;
}

html body .ant-input-affix-wrapper:focus-within,
html body .ant-input:focus {
  border-color: var(--syn-green);
  box-shadow: var(--syn-ring);
}

/* ---------- Komponentenzugabe ---------- */

/* Workcenter picker: 56px trigger, 52px rows, 16px text. antd 5 puts the height on the root. */
html body .ant-select-lg.ant-select-single {
  height: 56px;
  font-size: 16px;
}

/* antd's own rules here are (0,4,0) :where() chains, so the sizes need !important */
html body .ant-select-lg.ant-select-single .ant-select-selector {
  height: 56px;
  padding: 0 16px !important;
  border-color: var(--syn-field) !important;
  border-radius: var(--syn-radius-input) !important;
  background: #fff !important;
  font-size: 16px;
}

html body .ant-select-lg.ant-select-single.ant-select-focused .ant-select-selector,
html body .ant-select-lg.ant-select-single.ant-select-open .ant-select-selector {
  border-color: var(--syn-green) !important;
  box-shadow: var(--syn-ring) !important;
}

html body .ant-select-lg.ant-select-single .ant-select-selection-search-input,
html body .ant-select-lg.ant-select-single .ant-select-selection-item,
html body .ant-select-lg.ant-select-single .ant-select-selection-placeholder {
  height: 54px !important;
  line-height: 54px !important;
  font-size: 16px !important;
}

html body .ant-select-lg.ant-select-single .ant-select-selection-item {
  font-weight: 600;
  color: var(--syn-ink);
}

html body .ant-select-lg.ant-select-single .ant-select-selection-placeholder {
  color: var(--syn-muted);
}

html body .ant-select-lg .ant-select-arrow {
  inset-inline-end: 16px;
  font-size: 14px;
  color: var(--syn-ink);
}

html body .ant-select-dropdown {
  padding: 6px;
  border: 1px solid var(--syn-line);
  border-radius: var(--syn-radius-card);
  box-shadow: 0 14px 34px rgba(0, 20, 13, 0.14), 0 2px 6px rgba(0, 20, 13, 0.06);
}

html body .ant-select-dropdown .ant-select-item {
  min-height: 52px;
  padding: 14px 14px;
  border-radius: var(--syn-radius-input);
  font-size: 16px;
  line-height: 24px;
  color: var(--syn-ink);
}

html body .ant-select-dropdown .ant-select-item + .ant-select-item {
  margin-top: 2px;
}

html body .ant-select-dropdown .ant-select-item-option-content {
  white-space: normal;
}

html body .ant-select-dropdown .ant-select-item-option-active:not(.ant-select-item-option-disabled) {
  background: var(--syn-tile);
}

html body .ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
  font-weight: 600;
  color: var(--syn-green-text);
  background: var(--syn-mist);
}

/* Intro and hint lines are set inline at 12-13px; lift them to phone-readable sizes */
[class*="_content_"] p[style*="font-size: 13px"] {
  font-size: 15px !important;
  color: var(--syn-text-2) !important;
}

[class*="_content_"] p[style*="font-size: 12px"] {
  font-size: 14px !important;
}

/* Component rows: the bundle renders their icon tile at 30px */
[class*="_menuBtn_"] > [class*="_iconTile_"][style*="width: 30px"] {
  width: 40px !important;
  height: 40px !important;
  font-size: 15px !important;
}

[class*="_menuBtn_"] .ant-tag {
  flex: none;
}

/* ---------- Tags ---------- */

html body .ant-tag {
  border-radius: var(--syn-radius-tag);
  font-weight: 600;
}

/* ---------- Booking confirmation (antd modal.confirm) ---------- */

html body .ant-modal-root .ant-modal {
  max-width: calc(100vw - 32px);
}

html body .ant-modal .ant-modal-content {
  padding: 24px 20px 20px;
  border-radius: var(--syn-radius-modal);
}

html body .ant-modal-confirm .ant-modal-confirm-title {
  font-family: var(--syn-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--syn-ink);
}

html body .ant-modal-confirm .ant-modal-confirm-content {
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

html body .ant-modal-confirm .ant-modal-confirm-btns {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

html body .ant-modal-confirm .ant-modal-confirm-btns .ant-btn {
  flex: 1 1 0;
  height: 52px;
  margin: 0;
  border-radius: var(--syn-radius-button);
  box-shadow: none;
  font-size: 16px;
  font-weight: 600;
}

html body .ant-modal-confirm .ant-modal-confirm-btns .ant-btn-default {
  border-color: var(--syn-field);
  color: var(--syn-ink);
}

html body .ant-btn-primary:not(:disabled):not(.ant-btn-dangerous) {
  background: var(--syn-green);
  border-color: var(--syn-green);
}

/* ---------- Toasts clear the notch ---------- */

html body .ant-message {
  top: calc(8px + env(safe-area-inset-top)) !important;
}

html body .ant-message .ant-message-notice-content {
  border-radius: var(--syn-radius-card);
  font-size: 15px;
}

/* Phones: the Syntegon logo is wide (5.8 : 1), so it is drawn smaller to leave room for the full title
   "Mobile Dialoge" next to the language chip and logout (width follows the height, the padded PNG is kept) */
@media (max-width: 420px) {
  [class*="_appbarLogoTenant_"] {
    height: 19px;
  }
}

/* Narrow phones (360px class) */
@media (max-width: 374px) {
  [class*="_appbar_"] {
    gap: 8px;
  }
  [class*="_appbarLogoTenant_"] {
    height: 17px;
  }
  [class*="_appbarTitle_"] {
    padding-left: 8px;
    font-size: 14.5px;
  }
  [class*="_sectionLabel_"]:has(+ [class*="_menuList_"] > [class*="_menuBtn_"][style*="min-height: 96px"]) {
    font-size: 27px;
  }
  [class*="_menuBtn_"] > [class*="_iconTile_"][style*="width: 30px"] {
    width: 34px !important;
    height: 34px !important;
  }
}

/* ---------- Login card (inline-styled by the bundle) ---------- */

[style*="background: var(--login-bg)"] > div[style*="max-width: 360px"] {
  border: 1px solid var(--syn-line);
  border-radius: var(--syn-radius-card) !important;
  box-shadow: 0 18px 40px rgba(0, 20, 13, 0.08) !important;
}

[style*="background: var(--login-bg)"] h4.ant-typography {
  margin-top: 4px !important;
  font-family: var(--syn-display) !important;
  font-size: 25px !important;
  font-weight: 500 !important;
  color: var(--syn-ink);
}

/* The logo button carries the app-bar background; on the white card it needs none */
[style*="background: var(--login-bg)"] button[style*="background: var(--appbar-bg)"] {
  background: transparent !important;
}

html body .ant-btn {
  border-radius: var(--syn-radius-button) !important;
  box-shadow: none !important;
}

html body .ant-btn-lg {
  height: 52px;
  font-size: 16px;
  font-weight: 600;
}

/* Status tags: running = a calm blue (assumed, the cleaning-state blue family) instead of antd blue,
   booked = the Syntegon green on green-25 */
html body .ant-tag.ant-tag-processing,
html body .ant-tag.ant-tag-blue {
  color: #1f5f96 !important;
  background: #e5eff8 !important;
  border-color: #c3daef !important;
}

html body .ant-tag.ant-tag-success,
html body .ant-tag.ant-tag-green {
  color: var(--syn-green-text) !important;
  background: var(--syn-mist) !important;
  border-color: var(--syn-mist-line) !important;
}

/* The booked check tile next to a component */
[class*="_menuBtn_"] > [class*="_iconTile_"][style*="success"] {
  color: var(--syn-green-text) !important;
  background: var(--syn-mist) !important;
}

html body .ant-modal-confirm-confirm .ant-modal-confirm-body > .anticon {
  color: var(--syn-green);
}
