/* FISCHMANN.IT Kundenportal – App-Aufbau angelehnt an TANSS, CI von www.fischmann.it */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* CI-Farben (nicht ändern) */
  --navy: #1e2d47;
  --navy-2: #15223a;
  --navy-3: #2b3d5f;
  --blue: #2d67cf;
  --blue-dark: #2457b4;
  --blue-bright: #4290fb;
  --blue-light: #a8cbfb;
  --blue-mist: #e6effc;
  --ink: #1e2d47;
  --text: #33415a;
  --muted: #5f6c82;
  --line: #dde4ee;
  --light: #f1f4f8;
  --light-2: #e7ecf3;
  --white: #fff;
  --success: #1f8a5b;
  --success-bg: #e3f4ec;
  --error: #c0392b;
  --warning-bg: #fff6e5;
  --warning: #8a5a00;
  /* CI-Schriften (nicht ändern) */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Montserrat", "Inter", system-ui, sans-serif;
  /* Aufbau */
  --topbar-h: 60px;
  --sidebar-w: 256px;
  --content-max: 1180px;
  --radius: 8px;
  --radius-lg: 14px;
  --field-border: #c9d3e1;
  --shadow: 0 1px 2px rgba(21, 34, 58, .05), 0 6px 20px rgba(21, 34, 58, .05);
  --shadow-pop: 0 14px 36px rgba(21, 34, 58, .18), 0 2px 6px rgba(21, 34, 58, .08);
  --ring: 0 0 0 3px rgba(45, 103, 207, .2);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 20px); }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55;
  color: var(--text); background: var(--light); -webkit-font-smoothing: antialiased;
}
body.is-auth { background: var(--white); }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
h1, h2, h3, legend { font-family: var(--font-head); color: var(--ink); line-height: 1.25; }
:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html:not(.js) .js-only { display: none; }

.icon {
  width: 20px; height: 20px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px;
  background: var(--white); color: var(--ink); font-weight: 600; border-radius: var(--radius); box-shadow: var(--shadow-pop);
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue);
}

/* ------------------------------------------------------------------
   Kopfzeile
   ------------------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px; padding: 0 16px 0 24px; color: var(--white);
  background: radial-gradient(900px 200px at 85% -80%, rgba(66, 144, 251, .35), transparent 70%),
              linear-gradient(120deg, var(--navy-2) 0%, var(--navy) 60%, var(--navy-3) 100%);
}
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { display: block; height: 34px; width: auto; }
.topbar-divider { width: 1px; height: 24px; background: rgba(168, 203, 251, .35); }
.topbar-title { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--blue-light); letter-spacing: .02em; }
.topbar-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; flex: 0 0 auto;
  border: 0; border-radius: 10px; background: transparent; color: var(--white); cursor: pointer;
}
.topbar-btn:hover { background: rgba(255, 255, 255, .1); }
.topbar-btn .icon { width: 22px; height: 22px; }
.nav-toggle { display: none; }
.nav-toggle .icon-close, .nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Benutzermenü */
.usermenu { position: relative; margin-left: auto; }
.usermenu-trigger {
  display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px;
  list-style: none; cursor: pointer; color: var(--white);
}
.usermenu-trigger::-webkit-details-marker { display: none; }
.usermenu-trigger:hover, .usermenu[open] .usermenu-trigger { background: rgba(255, 255, 255, .1); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; display: inline-grid; place-items: center;
  background: var(--blue); color: var(--white); font: 600 13px/1 var(--font-head); letter-spacing: .03em;
}
.avatar-lg { width: 40px; height: 40px; font-size: 15px; }
.header-user { font-size: 14px; font-weight: 500; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu-caret { width: 16px; height: 16px; opacity: .75; transition: transform .15s ease; }
.usermenu[open] .usermenu-caret { transform: rotate(180deg); }
.usermenu-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 290px; padding: 8px;
  background: var(--white); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop);
}
.usermenu-who { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.usermenu-text { min-width: 0; }
.usermenu-text strong { display: block; color: var(--ink); font-size: 14px; }
.usermenu-mail { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.usermenu-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius);
  color: var(--ink); font-weight: 500; text-decoration: none;
}
.usermenu-item:hover { background: var(--light); color: var(--ink); }
.usermenu-item .icon { color: var(--muted); }

/* ------------------------------------------------------------------
   App-Aufbau: Seitenleiste + Inhalt
   ------------------------------------------------------------------ */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: calc(100vh - var(--topbar-h)); }

.sidebar {
  position: sticky; top: var(--topbar-h); align-self: start; height: calc(100vh - var(--topbar-h));
  display: flex; flex-direction: column; gap: 20px; padding: 20px 16px 16px; overflow-y: auto;
}

.company {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
}
.company-avatar {
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--navy); color: var(--white); font: 700 14px/1 var(--font-head); letter-spacing: .04em;
}
.company-avatar-sm { width: 34px; height: 34px; border-radius: 9px; font-size: 13px; }
.company-text { min-width: 0; display: flex; flex-direction: column; }
.company-label { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.company-name { color: var(--ink); font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.company-switch { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; font-weight: 600; text-decoration: none; }
.company-switch .icon { width: 14px; height: 14px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--text); font-weight: 500; text-decoration: none;
}
.nav-item .icon { color: var(--muted); }
.nav-item:hover { background: var(--light-2); color: var(--ink); }
.nav-item.is-active { background: var(--blue-mist); color: var(--blue-dark); font-weight: 600; }
.nav-item.is-active .icon { color: var(--blue); }
.nav-item.is-active::before {
  content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue);
}

.sidebar-foot { margin-top: auto; }
.support-card {
  display: grid; gap: 8px; padding: 14px; font-size: 13.5px;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
}
.support-title { font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--ink); }
.support-card a, .support-hours { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.support-card a:hover { color: var(--blue); }
.support-card .icon { width: 16px; height: 16px; color: var(--blue); }

.main { min-width: 0; display: flex; flex-direction: column; padding: 28px 32px 0; }
.main:focus { outline: none; }
.main-inner { width: 100%; max-width: var(--content-max); margin: 0 auto; flex: 1; }
.main-foot {
  width: 100%; max-width: var(--content-max); margin: 48px auto 0; padding: 18px 0 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.main-foot strong { color: var(--ink); font-weight: 600; }
.main-foot a { color: var(--muted); }
.main-foot a:hover { color: var(--blue); }
.main-foot-links { display: flex; gap: 16px; }
.main-foot-support { display: none; }

/* ------------------------------------------------------------------
   Seitenkopf, Flächen, Hinweise
   ------------------------------------------------------------------ */
.page-head { margin-bottom: 24px; }
.crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); font-weight: 500; text-decoration: none; }
.crumbs a:hover { color: var(--blue); }
.crumbs .icon { width: 14px; height: 14px; }
.page-head h1 { margin: 4px 0 6px; font-size: clamp(24px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.01em; }
.page-lead { margin: 0; max-width: 700px; font-size: 16px; color: var(--muted); }

.panel {
  padding: 24px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.panel-narrow { max-width: 620px; }
.panel-title { margin: 0 0 16px; font-size: 17px; }

.callout {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; padding: 14px 16px;
  background: var(--blue-mist); border: 1px solid #cfdef8; border-radius: var(--radius); color: var(--navy);
}
.callout .icon { color: var(--blue); margin-top: 1px; }
.callout p { margin: 0; }

.alert {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 12px 14px;
  border-radius: var(--radius); font-weight: 500;
}
.alert .icon { margin-top: 1px; }
.alert-error { background: #fdecea; border: 1px solid #f3c2bc; color: #8e2a1f; }
.alert-info { background: var(--blue-mist); border: 1px solid #cfdef8; color: var(--navy); }
.alert-info .icon { color: var(--blue); }
.alert:focus { outline: none; }

/* ------------------------------------------------------------------
   Übersicht
   ------------------------------------------------------------------ */
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.action-card {
  display: flex; flex-direction: column; gap: 16px; padding: 24px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.action-card:hover { color: var(--text); border-color: var(--blue-light); box-shadow: 0 14px 34px rgba(21, 34, 58, .12); transform: translateY(-2px); }
.action-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-mist); color: var(--blue); }
.action-icon .icon { width: 24px; height: 24px; }
.action-title { display: block; margin-bottom: 4px; font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--ink); }
.action-text { display: block; }
.action-foot {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap;
}
.action-meta { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.action-meta .icon { width: 16px; height: 16px; }
.action-cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--blue); white-space: nowrap; }
.action-cta .icon { width: 18px; height: 18px; transition: transform .15s ease; }
.action-card:hover .action-cta .icon { transform: translateX(3px); }

/* Servicekatalog: alle Services als Kacheln in einem Raster (Symbol oben, Titel, Text, unten ggf. Hinweis und
   „Anfrage stellen“), drei Spalten, ab 900 px Breite abwärts zwei, auf dem Handy eine. Ohne Silbentrennung,
   Titel mit ausgeglichenen Zeilen */
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.service-card { gap: 12px; padding: 20px; }
.service-card .action-icon { width: 44px; height: 44px; border-radius: 11px; }
.service-card .action-icon .icon { width: 22px; height: 22px; }
.service-card .action-title { font-size: 16.5px; line-height: 1.3; text-wrap: balance; overflow-wrap: break-word; }
.service-card .action-text { font-size: 14px; color: var(--muted); }
.service-foot { margin-top: auto; display: grid; justify-items: start; gap: 10px; }
.service-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; color: var(--blue); }
.service-cta .icon { width: 17px; height: 17px; transition: transform .15s ease; }
.service-card:hover .service-cta .icon { transform: translateX(3px); }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps li { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: start; }
.steps li:not(:last-child)::before {
  content: ""; position: absolute; left: 15.5px; top: 38px; bottom: -14px; width: 1px; background: var(--line);
}
.step-no {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--light); border: 1px solid var(--line); color: var(--ink); font: 700 14px/1 var(--font-head);
}
.steps strong { display: block; color: var(--ink); }
.step-text { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }

.panel-urgent {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  background: radial-gradient(420px 220px at 100% 0%, rgba(66, 144, 251, .3), transparent 70%), var(--navy);
  border-color: var(--navy); color: #d3dcea;
}
.panel-urgent .panel-title { margin: 0; color: var(--white); }
.panel-urgent p { margin: 0 0 6px; }
.panel-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(168, 203, 251, .16); color: var(--blue-light); }

/* ------------------------------------------------------------------
   Formular
   ------------------------------------------------------------------ */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.form-main {
  min-width: 0; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.form-section { min-width: 0; margin: 0; padding: 24px 28px 28px; border: 0; border-top: 1px solid var(--line); }
.form-section:first-child { border-top: 0; }
.section-title { float: left; width: 100%; margin: 0 0 18px; padding: 0; font-size: 16px; font-weight: 700; }
.grid { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { grid-column: 1 / -1; min-width: 0; }
.field.half { grid-column: span 1; }
.js .is-hidden { display: none !important; }
.field-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.req { color: var(--error); }
.help { margin: -2px 0 8px; font-size: 13.5px; color: var(--muted); }
.field-static {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px;
  background: var(--light); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); overflow-wrap: anywhere;
}
.field-static .icon { width: 18px; height: 18px; color: var(--muted); }
.help.field-static-note { margin: 6px 0 0; }

input[type=text], input[type=email], input[type=tel], input[type=date], input[type=search], textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  font: inherit; font-size: 16px; color: var(--ink); background: var(--white);
  border: 1px solid var(--field-border); border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type=search] { -webkit-appearance: none; appearance: none; }
select {
  width: 100%; min-height: 44px; padding: 10px 12px;
  font: inherit; font-size: 16px; color: var(--ink); background-color: var(--white);
  border: 1px solid var(--field-border); border-radius: var(--radius); cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
select:hover { border-color: #a9b7cb; }
select:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
/* Anhänge: gestrichelte Fläche, Auswahlknopf im Stil der übrigen Knöpfe */
input[type=file] {
  width: 100%; padding: 12px; font: inherit; font-size: 15px; color: var(--text); background: var(--white);
  border: 1px dashed var(--field-border); border-radius: var(--radius); cursor: pointer;
}
input[type=file]::file-selector-button {
  margin-right: 12px; padding: 8px 14px; font: inherit; font-weight: 600; color: var(--ink);
  background: var(--light); border: 1px solid var(--field-border); border-radius: 8px; cursor: pointer;
}
input:hover, textarea:hover { border-color: #a9b7cb; }
input:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: #93a0b4; }

.choices { display: grid; gap: 8px; }
.choices.inline { display: flex; flex-wrap: wrap; gap: 8px; }
.choices.columns { grid-template-columns: 1fr 1fr; }
.choices.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice {
  position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; cursor: pointer;
  background: var(--white); border: 1px solid var(--field-border); border-radius: var(--radius);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.choice:hover { border-color: var(--blue-light); background: #f8fbff; }
.choice input { flex: 0 0 auto; width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--blue); }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-mist); box-shadow: inset 0 0 0 1px var(--blue); }
.choice:has(input:focus-visible) { outline: 3px solid var(--blue-bright); outline-offset: 2px; }
.choice-text { min-width: 0; line-height: 1.45; }
.choice-text small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.choices.inline .choice { padding: 8px 16px 8px 12px; border-radius: 999px; }
.cards .choice { flex-direction: column; gap: 6px; padding: 14px 16px; }
.cards .choice-text { font-weight: 600; color: var(--ink); }
.cards .choice-text small { font-weight: 400; }
.other-input { max-width: 520px; margin-top: 8px; }

.has-error input[type=text], .has-error input[type=email], .has-error input[type=tel],
.has-error input[type=date], .has-error textarea { border-color: var(--error); }
.has-error .choice { border-color: #e8b3ad; }
.error-text { margin-top: 6px; font-size: 13.5px; font-weight: 500; color: var(--error); }
.field-warning {
  margin-top: 8px; padding: 10px 12px; font-size: 13.5px; border-radius: var(--radius);
  background: var(--warning-bg); color: var(--warning); border: 1px solid #f1d9a6;
}

/* Kasten „Ihre Anfrage“ */
.summary { min-width: 0; }
.summary-card {
  display: grid; gap: 16px; padding: 20px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.summary-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.summary-title { margin: 0; font-size: 16px; }
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  background: var(--blue-mist); color: var(--blue-dark); font-size: 12px; font-weight: 600;
}
.summary-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 20px; margin: 0; }
.summary-row { min-width: 0; }
.summary-row dt { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.summary-row dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.summary-days { display: block; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.placeholder { font-weight: 400; color: #8492a8; }
.leadtime { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--radius); font-size: 13.5px; font-weight: 500; }
.leadtime .icon { width: 18px; height: 18px; margin-top: 1px; }
.leadtime.is-ok { background: var(--success-bg); color: #17694a; }
.leadtime.is-warn { background: var(--warning-bg); color: var(--warning); }
.progress-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.progress-head strong { color: var(--ink); font-weight: 600; }
.progress {
  display: block; width: 100%; height: 6px; border: 0; border-radius: 999px; overflow: hidden;
  background: var(--light-2); -webkit-appearance: none; appearance: none;
}
.progress::-webkit-progress-bar { background: var(--light-2); border-radius: 999px; }
.progress::-webkit-progress-value { background: var(--blue); border-radius: 999px; transition: width .25s ease; }
.progress::-moz-progress-bar { background: var(--blue); border-radius: 999px; }
.is-complete .progress::-webkit-progress-value { background: var(--success); }
.is-complete .progress::-moz-progress-bar { background: var(--success); }
.is-complete .progress-head strong { color: var(--success); }
.summary-note { margin: -4px 0 0; font-size: 12.5px; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------------
   Knöpfe
   ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: var(--white); box-shadow: 0 1px 2px rgba(21, 34, 58, .14); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: var(--white); }
.btn-primary:disabled { opacity: .7; cursor: progress; }
.btn-ghost { background: var(--white); border-color: var(--field-border); color: var(--ink); }
.btn-ghost:hover { background: #f8fbff; border-color: var(--blue-light); color: var(--ink); }
.btn-light { background: var(--white); border-color: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--blue-mist); border-color: var(--blue-mist); color: var(--navy); }
.btn-lg { min-height: 48px; font-size: 16px; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn-link {
  padding: 0; font: inherit; color: var(--blue); background: none; border: 0; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px;
}
.btn-link:hover { color: var(--blue-dark); }
.btn-link:disabled { color: var(--muted); cursor: progress; }

/* ------------------------------------------------------------------
   Bestätigung
   ------------------------------------------------------------------ */
.done-panel { max-width: 760px; padding: 32px; }
.done-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.success-icon {
  width: 52px; height: 52px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--success-bg); color: var(--success);
}
.success-icon .icon { width: 26px; height: 26px; stroke-width: 2.4; }
.done-title { margin: 4px 0 0; font-size: clamp(22px, 2.4vw, 26px); }
.done-lead { font-size: 16px; }
.ticket-no { font-family: var(--font-head); font-weight: 700; color: var(--blue); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ticket-list { list-style: none; margin: 0 0 18px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ticket-list li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); }
.ticket-list li:first-child { border-top: 0; }
.ticket-list .icon { width: 18px; height: 18px; color: var(--muted); }
.ticket-list .ticket-no { min-width: 64px; }
.ticket-kind { color: var(--ink); font-weight: 500; }
.ticket-state { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: var(--success-bg); color: #17694a; font-size: 12px; font-weight: 600; }

/* ------------------------------------------------------------------
   Tickets: Übersicht und Ansicht
   ------------------------------------------------------------------ */
/* Zeile über den Filtern (Tickets): Umschalter links, „Neues Ticket“ rechts bündig mit dem Filterkasten */
.ticket-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.ticket-new { margin-left: auto; }
.scope-tabs { display: inline-flex; gap: 4px; margin-bottom: 0; padding: 4px; background: var(--light-2); border-radius: 12px; }
.scope-tabs a { padding: 8px 16px; border-radius: 9px; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; }
.scope-tabs a:hover { color: var(--ink); background: rgba(255, 255, 255, .55); }
.scope-tabs a[aria-current="page"] { background: var(--white); color: var(--blue-dark); box-shadow: 0 1px 2px rgba(21, 34, 58, .08), 0 2px 8px rgba(21, 34, 58, .06); }

.ticket-filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 16px; margin-bottom: 20px; padding: 16px 18px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.filter-search { flex: 1 1 280px; min-width: 0; }
.filter-field { flex: 0 1 190px; min-width: 150px; }
.filter-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.filter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ticket-filters input[type=search], .ticket-filters select { height: 46px; }

.panel.ticket-panel { padding: 0; overflow: hidden; }
.ticket-panel + .ticket-panel { margin-top: 20px; }
.ticket-panel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.ticket-panel-head .panel-title { margin: 0; }
.count {
  min-width: 26px; padding: 2px 8px; border-radius: 999px; text-align: center;
  background: var(--light-2); color: var(--ink); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.ticket-panel-note { margin-left: auto; font-size: 13px; color: var(--muted); }
/* Erledigte: aufklappbar (details), Kopf wie die übrigen Panels */
.ticket-fold > summary { list-style: none; cursor: pointer; }
.ticket-fold > summary::-webkit-details-marker { display: none; }
.ticket-fold:not([open]) > summary { border-bottom: 0; }
.ticket-fold > summary:hover .panel-title { color: var(--blue); }
.ticket-fold > summary:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--blue-bright); }
.fold-caret { color: var(--muted); transition: transform .15s ease; }
.ticket-fold[open] .fold-caret { transform: rotate(180deg); }

.ticket-rows { list-style: none; margin: 0; padding: 0; }
.ticket-row {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 24px;
  border-top: 1px solid var(--line); transition: background-color .15s ease;
}
.ticket-row:first-child { border-top: 0; }
.ticket-row:hover { background: #f8fbff; }
.ticket-row-main { flex: 1; min-width: 0; }
.ticket-row-title { color: var(--ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
/* Ganze Zeile klickbar; für Tastatur und Screenreader bleibt es ein einziger Link */
.ticket-row-title::after { content: ""; position: absolute; inset: 0; }
.ticket-row-title:hover { color: var(--blue-dark); }
.ticket-row-title:focus-visible { outline: none; }
.ticket-row:has(.ticket-row-title:focus-visible) { box-shadow: inset 0 0 0 3px var(--blue-bright); }
.ticket-row-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 3px; font-size: 13.5px; color: var(--muted); }

.status {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 4px 11px 4px 9px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.is-received { background: var(--light-2); color: var(--navy-3); }
.status.is-progress { background: var(--blue-mist); color: var(--blue-dark); }
.status.is-waiting { background: var(--warning-bg); color: var(--warning); box-shadow: inset 0 0 0 1px #f1d9a6; }
.status.is-done { background: var(--success-bg); color: #17694a; }

/* Teilschritte eines Projekts als Leiste: ein Abschnitt je Unterticket, eingefärbt nach Stand */
.substep-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.substep-track { display: inline-flex; gap: 3px; }
.substep-track i { width: 22px; height: 6px; border-radius: 999px; background: var(--field-border); }
.substep-track i.is-progress { background: var(--blue); }
.substep-track i.is-waiting { background: var(--warning); }
.substep-track i.is-done { background: var(--success); }

.empty-note { display: flex; align-items: center; gap: 12px; padding: 22px 24px; color: var(--muted); }
.empty-note .icon { width: 24px; height: 24px; color: #93a0b4; }
.empty-note p { margin: 0; }
.more-note { margin: 0; padding: 12px 24px; border-top: 1px solid var(--line); background: var(--light); font-size: 13.5px; color: var(--muted); }
.more-note a { margin-left: 4px; font-weight: 600; }

.ticket-head h1 { overflow-wrap: anywhere; }
.callout-warn { background: var(--warning-bg); border-color: #f1d9a6; color: var(--warning); }
.callout-warn .icon { color: var(--warning); }
.callout-warn a { color: inherit; font-weight: 600; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.ticket-main, .ticket-side { display: grid; gap: 20px; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-head .panel-title { margin: 0; }
.panel-head-note { font-size: 13px; color: var(--muted); }
.ticket-text { white-space: pre-line; overflow-wrap: anywhere; }
/* Verlauf eines Tickets: E-Mails, Leistungen, Kommentare */
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.history-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.history-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 8px; }
.history-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--blue-mist); color: var(--blue); }
.history-icon .icon { width: 16px; height: 16px; }
.history-kind { font-weight: 700; color: var(--ink); }
.history-meta { font-size: 13.5px; color: var(--muted); }
.history-title { margin: 0 0 6px; font-weight: 600; color: var(--ink); }
.muted-note { margin: 0; color: var(--muted); }
/* Kommentar an ein offenes Ticket (Ticketansicht) */
.comment-form textarea { margin-bottom: 14px; }
.comment-actions { display: flex; justify-content: flex-end; }
.substeps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.substeps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.substep-link { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; color: var(--ink); text-decoration: none; }
.substep-link:hover .substep-title { color: var(--blue-dark); text-decoration: underline; }
.substep-title { font-weight: 500; overflow-wrap: anywhere; }
.facts { display: grid; gap: 14px; margin: 0; }
.facts dt { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.panel-help { display: grid; gap: 8px; font-size: 14px; }
.panel-help .panel-title { margin: 0; font-size: 15px; }
.panel-help p { margin: 0 0 4px; color: var(--muted); }
.panel-help a { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.panel-help a:hover { color: var(--blue); }
.panel-help .icon { width: 16px; height: 16px; color: var(--blue); }
.empty-state { display: grid; justify-items: start; gap: 4px; }
.empty-state p { margin: 0 0 14px; }
.empty-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-mist); color: var(--blue); }
.empty-icon .icon { width: 24px; height: 24px; }
.empty-title { margin: 10px 0 4px; font-size: 22px; }
.empty-state .badge { margin-bottom: 8px; }

/* ------------------------------------------------------------------
   Anmeldung
   ------------------------------------------------------------------ */
.auth { display: grid; grid-template-columns: minmax(380px, 42%) minmax(0, 1fr); min-height: 100vh; }
.auth-brand {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 40px; padding: 40px 48px;
  color: #c5d3e8;
  background: radial-gradient(760px 480px at 100% 0%, rgba(66, 144, 251, .28), transparent 62%),
              linear-gradient(160deg, var(--navy-2) 0%, var(--navy) 55%, var(--navy-3) 100%);
}
/* Bildmarke als großes Wasserzeichen */
.auth-brand::after {
  content: ""; position: absolute; right: -150px; bottom: -170px; width: 560px; height: 560px; pointer-events: none;
  background: url("../img/favicon.svg") no-repeat center / contain; opacity: .08;
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand .brand img { height: 44px; }
.auth-intro { max-width: 460px; margin-top: auto; }
.eyebrow-light { color: var(--blue-light); }
.auth-title { margin: 10px 0 12px; font-family: var(--font-head); font-size: clamp(26px, 2.6vw, 34px); font-weight: 700; line-height: 1.2; color: var(--white); }
.auth-lead { margin: 0; font-size: 16px; }
.auth-steps { list-style: none; max-width: 460px; margin: 0 0 auto; padding: 0; display: grid; gap: 4px; }
.auth-steps li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; padding: 12px; border-radius: 12px; }
.auth-steps li.is-current { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(168, 203, 251, .25); }
.auth-step-no {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid rgba(168, 203, 251, .4); color: var(--blue-light); font: 700 14px/1 var(--font-head);
}
.auth-step-no .icon { width: 18px; height: 18px; stroke-width: 2.4; }
.is-current .auth-step-no { background: var(--blue-bright); border-color: var(--blue-bright); color: var(--white); }
.is-done .auth-step-no { background: rgba(66, 144, 251, .2); border-color: transparent; }
.auth-step-text strong { display: block; font-weight: 600; color: var(--white); }
.auth-step-text small { display: block; margin-top: 2px; font-size: 13.5px; color: #9fb0c9; }
.auth-support { margin: 0; font-size: 14px; }
.auth-support a { color: var(--white); }

.auth-main { display: flex; flex-direction: column; min-width: 0; background: var(--white); }
.auth-main:focus { outline: none; }
.auth-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-heading { margin: 4px 0 10px; font-size: 28px; font-weight: 700; }
.auth-text { margin: 0 0 22px; color: var(--muted); }
.auth-text strong { color: var(--ink); overflow-wrap: anywhere; }
.auth-form { display: grid; gap: 14px; margin-bottom: 22px; }
.auth-form .field-label { margin-bottom: -8px; }
.auth-help { font-size: 14px; color: var(--muted); }
.auth-help p { margin: 0 0 6px; }
.auth-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.inline-form { display: inline; }
.auth-step-mobile { display: none; }
.auth-foot {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 18px 24px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.auth-foot a { color: var(--muted); }

.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 40px; }
.code-input {
  font-family: var(--font-head); font-size: 26px !important; font-weight: 600; text-align: center;
  letter-spacing: .35em; padding-left: calc(12px + .35em) !important; font-variant-numeric: tabular-nums;
}

.company-choices { gap: 10px; }
.choice-company { align-items: center; gap: 12px; padding: 12px 14px; }
.choice-company input { margin: 0; }
.choice-company .choice-text { font-weight: 600; color: var(--ink); }

/* ------------------------------------------------------------------
   Breakpoints
   ------------------------------------------------------------------ */
@media (min-width: 1280px) {
  .form-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .summary { position: sticky; top: calc(var(--topbar-h) + 20px); }
}

/* Tablet und Handy: Seitenleiste wird zur ausklappbaren Navigation */
@media (max-width: 1023.98px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav-toggle { display: inline-grid; }
  .topbar { padding-left: 8px; gap: 10px; }
  .topbar-divider, .topbar-title { display: none; }
  .sidebar { position: static; height: auto; padding: 16px; }
  html:not(.js) .sidebar-foot { display: none; }
  html:not(.js) .nav { flex-direction: row; flex-wrap: wrap; }
  .js .sidebar {
    position: fixed; z-index: 35; top: var(--topbar-h); left: 0; bottom: 0; width: min(86vw, 300px); height: auto; align-self: stretch;
    background: var(--light); box-shadow: var(--shadow-pop);
    transform: translateX(-100%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s;
  }
  .js .nav-open .sidebar { transform: none; visibility: visible; transition: transform .22s ease; }
  .nav-item.is-active::before { display: none; }
  .nav-backdrop { position: fixed; z-index: 30; inset: var(--topbar-h) 0 0 0; background: rgba(21, 34, 58, .45); }
  .nav-open { overflow: hidden; }
  .main { padding: 24px 24px 0; }
  .main-foot-support { display: inline; }
  .ticket-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 899.98px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-brand { gap: 14px; padding: 18px 20px 22px; }
  .auth-brand::after { width: 260px; height: 260px; right: -70px; bottom: -120px; }
  .auth-brand .brand img { height: 32px; }
  .auth-intro { margin-top: 0; }
  .auth-title { margin: 6px 0 0; font-size: 21px; }
  .auth-lead, .auth-steps, .auth-support { display: none; }
  .auth-panel { align-items: flex-start; padding: 28px 20px 36px; }
  .auth-step-mobile { display: inline-block; }
  .auth-heading { font-size: 24px; }
}

@media (max-width: 759.98px) {
  .topbar { padding-right: 8px; }
  .brand img { height: 28px; }
  .header-user, .usermenu-caret { display: none; }
  .usermenu-trigger { padding: 4px; }
  .usermenu-panel { width: min(290px, calc(100vw - 16px)); }
  .main { padding: 20px 16px 0; }
  .main-foot { flex-direction: column; margin-top: 32px; }
  .action-grid, .home-grid { grid-template-columns: minmax(0, 1fr); }
  .action-card { padding: 20px; }
  .service-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .service-card { padding: 16px; }
  .panel { padding: 20px 16px; }
  .done-panel { padding: 24px 18px; }
  .done-head { align-items: flex-start; }
  .form-section { padding: 20px 16px 24px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .field.half { grid-column: 1 / -1; }
  .choices.columns, .choices.cards { grid-template-columns: minmax(0, 1fr); }
  .summary-card { padding: 18px 16px; }
  .scope-tabs { display: flex; }
  .ticket-toolbar .scope-tabs, .ticket-new { flex: 1 1 100%; }
  .scope-tabs a { flex: 1; text-align: center; padding: 8px 10px; }
  .ticket-filters { padding: 14px; }
  .filter-field { flex: 1 1 140px; min-width: 0; }
  .filter-actions { width: 100%; }
  .filter-actions .btn { flex: 1; }
  .ticket-panel-head { padding: 14px 16px; }
  .ticket-row { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; }
  .ticket-row .status { order: -1; }
  .empty-note, .more-note { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
