/* LIVIN Kundenportal – Styles v3 (CI: livin.at) */

@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/BeVietnamPro-Regular.woff2") format("woff2"), url("fonts/BeVietnamPro-Regular.ttf") format("truetype"); }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/BeVietnamPro-SemiBold.woff2") format("woff2"), url("fonts/BeVietnamPro-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/BeVietnamPro-Bold.woff2") format("woff2"), url("fonts/BeVietnamPro-Bold.ttf") format("truetype"); }
@font-face { font-family: "DM Serif Display"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/DMSerifDisplay-Regular.woff2") format("woff2"), url("fonts/DMSerifDisplay-Regular.ttf") format("truetype"); }

:root {
    --navy: #173E62; --navy-dark: #10304d; --navy-deep: #0b2340; --navy-soft: #e8eef5;
    --gold: #BDA588; --gold-dark: #a58e70; --gold-soft: #f1e9de;
    --cream: #F7F2EC; --sand: #EFE7DC; --paper: #FBF8F4;
    --text: #66717A; --dark: #2f3438; --line: #E6DFD5; --line-soft: #efe9e1; --white: #ffffff;
    --ok: #2f7d4f; --ok-bg: #e6f3ea; --warn: #9a6b12; --warn-bg: #fbf1d9; --err: #a83232; --err-bg: #fbe5e5; --info-bg: #e7eef5;
    --font-body: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-head: "DM Serif Display", Georgia, "Times New Roman", serif;
    --r-lg: 18px; --r-md: 12px; --r-sm: 8px;
    --shadow: 0 1px 2px rgba(23,62,98,.04), 0 12px 32px -12px rgba(23,62,98,.14);
    --shadow-lg: 0 24px 60px -20px rgba(11,35,64,.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 15px; line-height: 1.65; color: var(--text); background: var(--cream);
    background-image: radial-gradient(1200px 500px at 15% -10%, rgba(189,165,136,.14), transparent 60%), radial-gradient(900px 400px at 100% 0, rgba(23,62,98,.06), transparent 60%); background-attachment: fixed; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 400; color: var(--navy); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.005em; }
h1 { font-size: clamp(1.9rem, 2.6vw, 2.5rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
a { color: var(--navy); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold-dark); }
code { font-size: .85em; background: var(--sand); padding: .1em .45em; border-radius: 6px; color: var(--dark); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--text); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1rem; }
.mt-lg { margin-top: 2rem; }
.lead { font-size: 1.05rem; }
.eyebrow { font-size: .7rem; letter-spacing: 3px; text-transform: uppercase; color: var(--gold-dark); font-weight: 700; margin: 0 0 .5em; }
.eyebrow a { color: inherit; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---- Wortmarke ---- */
.wordmark { display: inline-flex; align-items: flex-end; gap: 10px; color: var(--white); line-height: 1; }
.wordmark-main { display: flex; flex-direction: column; font-weight: 800; font-size: 26px; letter-spacing: 1px; }
.wordmark-main span { display: block; line-height: .85; }
.wordmark-sub { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); padding-bottom: 3px; white-space: nowrap; }
.wordmark-sub i { display: inline-block; width: 7px; height: 7px; background: var(--gold); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.logo-img { height: 44px; width: auto; display: block; }

/* ---- Topbar ---- */
.topbar { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%); color: var(--white); position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 8px 24px -12px rgba(11,35,64,.6); }
.topbar::after { content: ""; display: block; height: 2px; background: linear-gradient(90deg, var(--gold), rgba(189,165,136,.2)); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 20px; }
.topbar-logo { display: inline-flex; padding: 6px 0; }
.mainnav { display: flex; align-items: center; gap: 2px; }
.mainnav a { color: rgba(255,255,255,.78); padding: 9px 14px; font-weight: 600; font-size: .74rem; letter-spacing: 1.8px; text-transform: uppercase; border-radius: 999px; transition: background .15s, color .15s; }
.mainnav a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.mainnav a.active { color: var(--navy-deep); background: var(--gold); }
.mainnav .inline-form { margin-left: 10px; }
.mainnav .badge { margin: 0 4px 0 8px; }
.userchip { display: inline-flex; align-items: center; gap: 10px; margin-left: 14px; white-space: nowrap; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.9); font-size: .8rem; }
.userchip .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--navy-deep); font-weight: 700; font-size: .72rem; display: inline-flex; align-items: center; justify-content: center; letter-spacing: .5px; }
.userchip .btn { padding: 6px 10px; font-size: .64rem; letter-spacing: 1.2px; border-color: transparent; color: rgba(255,255,255,.8); }
.userchip .btn:hover { color: var(--gold); background: transparent; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; font-family: var(--font-body); font-size: .76rem; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; border: 1.5px solid transparent; border-radius: 999px; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, color .15s, border-color .15s; line-height: 1.2; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: var(--navy-deep); border-color: var(--gold); box-shadow: 0 8px 18px -8px rgba(189,165,136,.9); }
.btn-primary:hover { background: var(--navy); border-color: var(--navy); color: var(--white); box-shadow: 0 10px 22px -10px rgba(23,62,98,.8); }
.btn-outline { background: transparent; color: var(--navy); border-color: rgba(23,62,98,.35); }
.btn-outline:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.mainnav .btn-ghost { color: var(--white); border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-dark); background: var(--white); }
.mainnav .btn-ghost:hover { color: var(--gold); background: transparent; }
.btn-danger { background: transparent; color: var(--err); border-color: rgba(168,50,50,.4); }
.btn-danger:hover { background: var(--err); border-color: var(--err); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: .68rem; letter-spacing: 1.4px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.btn-col { display: flex; flex-direction: column; gap: 10px; margin-top: 1rem; }
.btn-col form { margin: 0; }

/* ---- Auth-Layout ---- */
.auth-body { background: var(--cream); }
.auth-wrap { display: grid; grid-template-columns: minmax(340px, 46%) 1fr; min-height: 100vh; }
.auth-wrap-single { grid-template-columns: 1fr; }
.auth-side { background: radial-gradient(900px 600px at 20% 10%, #1f4e7a 0%, var(--navy) 45%, var(--navy-deep) 100%); color: var(--white); padding: 48px 8%; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; right: -140px; bottom: -140px; width: 440px; height: 440px; border: 1px solid rgba(189,165,136,.35); border-radius: 50%; }
.auth-side::before { content: ""; position: absolute; right: -40px; bottom: -40px; width: 220px; height: 220px; border: 1px solid rgba(189,165,136,.55); border-radius: 50%; box-shadow: 0 0 0 40px rgba(189,165,136,.05); }
.auth-side h1 { color: var(--white); font-size: clamp(2.2rem, 3.8vw, 3.3rem); margin: .3em 0 .5em; }
.auth-side .lead { color: rgba(255,255,255,.78); max-width: 36ch; font-size: 1.08rem; }
.auth-side .eyebrow { color: var(--gold); }
.auth-side-text { position: relative; z-index: 1; }
.auth-side-foot { font-size: .78rem; color: rgba(255,255,255,.5); margin: 0; letter-spacing: 1px; position: relative; z-index: 1; }
.auth-logo { display: inline-flex; }
.auth-logo-dark { margin-bottom: 28px; }
.auth-logo-dark .wordmark { color: var(--navy); }
.auth-logo-dark .wordmark-sub { color: var(--gold-dark); }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 460px; background: var(--white); padding: 46px 42px; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--gold), var(--navy)); }
.card-title { margin-bottom: .3em; font-size: 1.7rem; }
.auth-foot { margin-top: 28px; font-size: .8rem; color: var(--text); display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.form-links { margin: 1.2em 0 0; font-size: .9rem; text-align: center; }

/* ---- Formulare ---- */
.form .field { margin-bottom: 1.1rem; }
label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dark); margin-bottom: 7px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=tel], select, textarea {
    width: 100%; font: inherit; color: var(--dark); background: var(--white); border: 1.5px solid var(--line); padding: 12px 14px; border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(189,165,136,.22); }
input::placeholder, textarea::placeholder { color: #a7adb3; }
textarea { resize: vertical; min-height: 96px; }
.hint { font-size: .8rem; color: var(--text); margin: 6px 0 0; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--dark); margin: .6rem 0 1rem; }
.check input { margin-top: 4px; accent-color: var(--navy); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.form-row-1-2-2 { grid-template-columns: 1fr 2fr 2fr; }
.field-sm { max-width: 220px; }
.form-row .field-sm { max-width: none; }
.field-wide { grid-column: span 2; }
input[type=date]::-webkit-datetime-edit { text-transform: uppercase; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 90px; }
.pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--navy); font-size: .68rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; padding: 6px; }
.strength { height: 5px; background: var(--line); margin-top: 8px; overflow: hidden; border-radius: 3px; }
.strength span { display: block; height: 100%; width: 0; background: var(--err); transition: width .25s, background .25s; }
.strength[data-level="2"] span { background: var(--warn); }
.strength[data-level="3"] span, .strength[data-level="4"] span { background: var(--ok); }
.searchbar { display: flex; gap: 10px; margin-bottom: 1.2rem; flex-wrap: wrap; }
.searchbar input { flex: 1; min-width: 220px; border-radius: 999px; padding-left: 18px; }
.fields-editor .field-row { grid-template-columns: 1fr 2fr auto; align-items: start; gap: 10px; }
.fields-editor .field { margin-bottom: 10px; }

/* ---- Flash ---- */
.flash { padding: 14px 18px 14px 20px; margin-bottom: 1.2rem; border-radius: var(--r-md); font-size: .95rem; display: flex; gap: 12px; align-items: flex-start; box-shadow: var(--shadow); }
.flash::before { content: ""; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; background: currentColor; }
.flash-success { background: var(--ok-bg); color: #1f5a37; }
.flash-error { background: var(--err-bg); color: #7d2323; }
.flash-info { background: var(--info-bg); color: var(--navy); }

/* ---- Seite / Cards ---- */
.page { padding: 36px 24px 70px; min-height: 60vh; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { margin-bottom: .2em; }
.page-head .lead { margin: 0; }
.card { background: var(--white); padding: 28px 30px; margin-bottom: 22px; border-radius: var(--r-lg); box-shadow: var(--shadow); border: 1px solid rgba(230,223,213,.6); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.card-empty { text-align: center; padding: 52px 30px; }
.card-danger { border-top: 3px solid var(--err); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.grid-2-wide { grid-template-columns: 1.6fr 1fr; }
.grid-2 .card { margin-bottom: 22px; }

/* ---- Hero (Kunden-Übersicht) ---- */
.hero { position: relative; overflow: hidden; background: radial-gradient(800px 400px at 10% 0%, #1f4e7a 0%, var(--navy) 45%, var(--navy-deep) 100%); color: var(--white); border-radius: var(--r-lg); padding: 38px 40px; margin-bottom: 26px; box-shadow: var(--shadow-lg); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.hero::after { content: ""; position: absolute; right: -90px; top: -90px; width: 320px; height: 320px; border-radius: 50%; border: 1px solid rgba(189,165,136,.35); box-shadow: 0 0 0 50px rgba(189,165,136,.05); }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: var(--white); margin-bottom: .25em; }
.hero .lead { color: rgba(255,255,255,.78); margin: 0; max-width: 56ch; }
.hero-text { position: relative; z-index: 1; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-actions .btn-outline { color: var(--white); border-color: rgba(255,255,255,.45); }
.hero-actions .btn-outline:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

/* ---- Kaufobjekt ---- */
.purchase { padding: 0; overflow: hidden; }
.purchase-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; padding: 26px 30px 20px; background: linear-gradient(180deg, var(--paper), var(--white)); border-bottom: 1px solid var(--line-soft); margin-bottom: 0; }
.purchase-head h2 { font-size: 1.75rem; }
.purchase-head .unit { color: var(--gold-dark); }
.purchase-body { padding: 8px 30px 26px; }
.status-pill, .pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; background: var(--gold-soft); color: var(--navy); font-size: .7rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; border-radius: 999px; white-space: nowrap; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-dark); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 18px 0 0; }
.facts-col { grid-template-columns: 1fr; gap: 10px; }
.facts div { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 12px 14px; }
.facts dt { font-size: .66rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text); font-weight: 700; margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--dark); font-weight: 600; font-size: 1.02rem; overflow-wrap: anywhere; }
.note { margin-top: 20px; background: var(--gold-soft); padding: 14px 18px; border-left: 3px solid var(--gold); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--dark); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 18px; }
.contact { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: var(--r-md); color: var(--dark); background: var(--white); }
.contact-grid .contact { margin-top: 0; }
.contact-label { display: block; font-size: .66rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text); font-weight: 700; margin-bottom: 4px; }
.contact-pm { border-color: rgba(168,50,50,.3); background: #fff8f8; padding-left: 16px; }
.contact-pm .contact-label { color: var(--err); }

/* ---- Dokumente ---- */
.folder-list, .file-list, .timeline { list-style: none; margin: 0; padding: 0; }
.folder-list li a { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: var(--r-sm); color: var(--dark); font-weight: 600; }
.folder-list li a:hover { background: var(--paper); }
.folder-list .count { margin-left: auto; font-weight: 600; font-size: .75rem; color: var(--navy); background: var(--navy-soft); padding: 2px 10px; border-radius: 999px; }
.file-list li + li { border-top: 1px solid var(--line-soft); }
.file-link { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 10px 10px; color: var(--dark); align-items: center; border-radius: var(--r-sm); }
.file-link:hover { background: var(--paper); }
.file-link .file-name { font-weight: 600; overflow-wrap: anywhere; }
.file-link .file-meta { grid-column: 2; font-size: .78rem; color: var(--text); }
.ico { display: inline-block; width: 30px; height: 30px; flex: 0 0 30px; vertical-align: middle; background: var(--sand); border-radius: 8px; position: relative; }
.ico::after { content: ""; position: absolute; inset: 0; margin: auto; width: 11px; height: 14px; border: 1.5px solid var(--navy); border-radius: 2px; }
.ico-folder { background: #f3e6cf; }
.ico-folder::after { width: 14px; height: 10px; border-radius: 2px; border-top-width: 3px; border-color: var(--gold-dark); }
.ico-pdf { background: #fbe5e5; } .ico-pdf::after { border-color: var(--err); }
.ico-jpg, .ico-jpeg, .ico-png { background: #e6f0f8; } .ico-jpg::after, .ico-jpeg::after, .ico-png::after { border-color: #3b7ab6; border-radius: 50%; width: 11px; height: 11px; }
.ico-docx { background: #e3ebf7; } .ico-docx::after { border-color: #2b579a; }
.ico-xlsx { background: #e3f3e8; } .ico-xlsx::after { border-color: #217346; }
.ico-zip { background: #efefef; } .ico-zip::after { border-style: dashed; }
.docs-table .file-cell { color: var(--dark); font-weight: 600; }
.docs-table .file-cell .ico { margin-right: 12px; }
.doc-folder.depth-2, .doc-folder.depth-3 { margin-left: 24px; }
.doc-folder.depth-2 h2, .doc-folder.depth-3 h2 { font-size: 1.15rem; }
.doc-folder.depth-2 h2::before, .doc-folder.depth-3 h2::before { content: "↳"; color: var(--gold-dark); }

/* ---- Tabellen ---- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .93rem; }
.table th { text-align: left; font-size: .66rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text); padding: 10px 12px; background: var(--paper); border-bottom: 1px solid var(--line); }
.table th:first-child { border-radius: 10px 0 0 10px; }
.table th:last-child { border-radius: 0 10px 10px 0; }
.table td.nowrap, .table td .nowrap { white-space: nowrap; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--dark); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: var(--paper); }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn { margin-left: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .64rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; margin-left: 4px; vertical-align: middle; }
.badge-admin { background: var(--gold); color: var(--navy-deep); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.text-danger { color: var(--err); }
.badge-off { background: #eee; color: #777; }
.badge-err { background: var(--err-bg); color: var(--err); }
.table-actions { text-align: right; white-space: nowrap; }
.field-btn { display: flex; flex-direction: column; justify-content: flex-end; }
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 18px; }

/* ---- Stats ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--white); padding: 20px 22px 18px; border-radius: var(--r-md); box-shadow: var(--shadow); border: 1px solid rgba(230,223,213,.6); display: block; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gold); }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-alert::before { background: var(--err); }
.stat-alert .stat-num { color: var(--err); }
.stat-num { display: block; font-family: var(--font-head); font-size: 2.3rem; color: var(--navy); line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: .68rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text); font-weight: 700; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.todo-list li:last-child { border-bottom: 0; }
.todo-list .todo-text { flex: 1; color: var(--dark); font-weight: 600; }
.todo-list .todo-meta { display: block; font-weight: 400; font-size: .8rem; color: var(--text); }
.todo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); flex: 0 0 10px; }
.todo-dot.is-new { background: #2b5f8e; box-shadow: 0 0 0 4px rgba(43,95,142,.15); }
.todo-dot.is-warn { background: var(--warn); }

/* ---- Footer ---- */
.footer { background: var(--navy-deep); color: rgba(255,255,255,.7); padding: 34px 0; font-size: .85rem; margin-top: 40px; }
.footer a { color: var(--gold); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; align-items: center; }
.footer strong { color: #fff; }

/* ---- Reklamationen (Tickets) ---- */
.tstatus { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; font-size: .66rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; white-space: nowrap; border-radius: 999px; vertical-align: middle; }
.tstatus::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tstatus-new { background: #e6f0f8; color: #2b5f8e; }
.tstatus-review { background: var(--warn-bg); color: var(--warn); }
.tstatus-progress { background: var(--gold-soft); color: var(--gold-dark); }
.tstatus-forwarded { background: #e8f1ee; color: #2f6b5a; }
.tstatus-waiting { background: #f3e9f7; color: #6c3d8a; }
.tstatus-done { background: var(--ok-bg); color: var(--ok); }
.tstatus-rejected { background: #eee; color: #666; }
.tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; margin: 0 0 1.2rem; background: var(--white); padding: 5px; border-radius: 999px; box-shadow: var(--shadow); border: 1px solid rgba(230,223,213,.6); }
.tabs a { padding: 8px 16px; font-size: .72rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text); border-radius: 999px; }
.tabs a.active { color: var(--white); background: var(--navy); }
.tabs a:hover:not(.active) { color: var(--navy); background: var(--paper); }
.row-high td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.ttimeline { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--line); }
.ttimeline li { position: relative; margin: 0 0 18px; }
.ttimeline li::before { content: ""; position: absolute; left: -27px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); border: 2px solid var(--white); box-shadow: 0 0 0 2px var(--cream); }
.tt-status { font-size: .85rem; color: var(--text); padding: 2px 0; }
.tt-status .tt-time { margin-right: 8px; }
.tt-time { font-size: .78rem; color: var(--text); white-space: nowrap; }
.tt-entry { background: var(--paper); padding: 14px 18px; border: 1px solid var(--line-soft); border-radius: var(--r-md); }
.tt-entry.tt-customer { border-left: 3px solid var(--navy); }
.tt-entry.tt-customer::before { background: var(--navy); }
.tt-entry.tt-livin { border-left: 3px solid var(--gold); background: var(--white); }
.tt-entry.tt-livin::before { background: var(--gold); }
.tt-entry.tt-note { background: var(--warn-bg); border-left: 3px dashed var(--warn); }
.tt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; color: var(--dark); }
.tt-head .tt-time { margin-left: auto; }
.tt-body { color: var(--dark); white-space: normal; overflow-wrap: anywhere; }
.attach-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.attach { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; color: var(--dark); font-size: .85rem; max-width: 100%; }
.attach:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.attach .ico { width: 24px; height: 24px; flex-basis: 24px; border-radius: 50%; }
.attach-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.attach-meta { color: var(--text); font-size: .75rem; }
.note-ok { border-left-color: var(--ok); background: var(--ok-bg); }
.steps { margin: 0; padding-left: 0; list-style: none; counter-reset: step; color: var(--dark); }
.steps li { position: relative; padding-left: 40px; margin-bottom: 12px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-dark); font-family: var(--font-head); font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; }
.note-urgent { border-left-color: var(--err); background: var(--err-bg); font-size: .9rem; }
.pm-list { margin: 8px 0; padding-left: 18px; }
input[type=file] { width: 100%; font: inherit; font-size: .9rem; color: var(--dark); padding: 9px 0; }
input[type=file]::file-selector-button { font: inherit; font-size: .68rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; padding: 9px 16px; margin-right: 12px; background: transparent; color: var(--navy); border: 1.5px solid rgba(23,62,98,.35); border-radius: 999px; cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.file-summary:empty { display: none; }
.file-summary.is-error { color: var(--err); font-weight: 600; }

/* ---- Umgebungs-Hinweis (Staging/Entwicklung) ---- */
.envbar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; padding: 7px 16px; background: repeating-linear-gradient(135deg, #f3c94a 0 14px, #e8b92e 14px 28px); color: #1d1d1b; font-size: 13px; font-weight: 500; letter-spacing: .01em; position: relative; z-index: 30; text-align: center; }
.envbar-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #1d1d1b; color: #f3c94a; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.auth-body .envbar { position: fixed; top: 0; left: 0; right: 0; }
.auth-body:has(.envbar) .auth-wrap { padding-top: 36px; }
@media print { .envbar { display: none !important; } }

/* Schmale Desktops / Tablets quer: Navigation kompakter, damit alle Punkte samt Benutzerchip Platz haben */
@media (min-width: 901px) and (max-width: 1440px) {
    .mainnav a { padding: 8px 10px; font-size: .68rem; letter-spacing: 1.2px; }
    .userchip { margin-left: 6px; gap: 8px; }
    .userchip .hide-sm { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-side { padding: 34px 24px; min-height: 0; }
    .auth-side h1 { font-size: 1.9rem; }
    .auth-side::before, .auth-side::after { display: none; }
    .grid-2, .grid-2-wide { grid-template-columns: 1fr; }
    .form-row-1-2-2 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .nav-toggle { display: block; }
    .mainnav { display: none; position: absolute; left: 0; right: 0; top: 76px; background: var(--navy-dark); flex-direction: column; align-items: stretch; padding: 10px 20px 20px; gap: 4px; box-shadow: 0 20px 40px -10px rgba(0,0,0,.4); }
    .mainnav.open { display: flex; }
    .mainnav a { padding: 14px 14px; border-radius: 10px; }
    .mainnav .inline-form { margin: 14px 0 0; }
    .mainnav .badge { align-self: flex-start; margin: 10px 6px 0; }
    .userchip { margin: 12px 0 0; align-self: flex-start; }
    .hide-sm { display: none; }
    .page { padding: 24px 16px 60px; }
    .card { padding: 22px 18px; border-radius: 14px; }
    .hero { padding: 28px 22px; border-radius: 14px; }
    .purchase-head, .purchase-body { padding-left: 18px; padding-right: 18px; }
    .auth-card { padding: 34px 24px; }
    .doc-folder.depth-2, .doc-folder.depth-3 { margin-left: 10px; }
    .fields-editor .field-row { grid-template-columns: 1fr auto; }
    .fields-editor .field-wide { grid-column: 1; }
    .table .actions { white-space: normal; }
    .table .actions .btn { margin: 3px 0 3px 4px; }
    .tabs { display: flex; border-radius: 14px; }
}
@media print { .topbar, .footer, .btn, .nav-toggle { display: none !important; } body { background: #fff; } .card { box-shadow: none; border: 1px solid #ddd; } }

/* ---- Übergabeprotokoll (Tablet) ---- */
.ho .ho-no { font-family: var(--font-body); font-size: 15px; font-weight: 500; letter-spacing: .04em; margin-left: 8px; }
.ho-head-actions { display: flex; gap: 10px; align-items: center; }
.ho-save { font-weight: 500; }
.ho-save.is-saving { color: var(--gold); }
.ho-save.is-ok { color: var(--ok); }
.ho-save.is-error { color: var(--err); font-weight: 600; }
.ho-steps { position: sticky; top: 74px; z-index: 15; display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 12px; margin: 0 0 18px; background: rgba(247,242,236,.94); backdrop-filter: blur(6px); border-radius: var(--r-md); border: 1px solid rgba(23,62,98,.08); }
.ho-steps a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: #fff; color: var(--navy); font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid rgba(23,62,98,.12); min-height: 40px; }
.ho-steps a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.ho-steps a.active .ho-step-n { background: var(--gold); color: var(--navy); }
.ho-step-n { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--cream); align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.ho-section { scroll-margin-top: 140px; }
.ho-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 18px; }
.ho-facts div { background: var(--cream); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; }
.ho-facts span { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text); margin-bottom: 3px; }
.ho-form input[type="text"], .ho-form input[type="date"], .ho-form input[type="time"], .ho-form textarea { font-size: 17px; min-height: 48px; }
.ho-form textarea { min-height: 64px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ho-static { min-height: 48px; display: flex; align-items: center; font-weight: 600; color: var(--navy); }
.ho-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ho-chip { position: relative; cursor: pointer; }
.ho-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.ho-chip { margin: 0; text-transform: none; letter-spacing: 0; }
.ho-chip span { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 13px; border-radius: 999px; border: 1.5px solid rgba(23,62,98,.25); background: #fff; font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--navy); }
.ho-chip input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.ho-chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.ho-checklist { display: flex; flex-direction: column; gap: 12px; }
.ho-item { border: 1.5px solid rgba(23,62,98,.12); border-radius: var(--r-md); padding: 14px 16px; background: #fff; }
.ho-item[data-status="ok"] { border-color: rgba(47,125,79,.5); background: #f4faf6; }
.ho-item[data-status="defect"] { border-color: rgba(168,50,50,.5); background: #fdf5f5; }
.ho-item[data-status="na"] { border-color: rgba(0,0,0,.12); background: #fafafa; }
.ho-item-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ho-item-label { font-weight: 600; font-size: 17px; color: var(--navy); display: flex; align-items: center; gap: 10px; }
.ho-item-n { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.ho-toggle { display: inline-flex; border-radius: 999px; overflow: hidden; border: 1.5px solid rgba(23,62,98,.2); }
.ho-toggle label { position: relative; cursor: pointer; }
.ho-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.ho-toggle span { display: inline-flex; align-items: center; justify-content: center; min-width: 96px; min-height: 46px; padding: 6px 14px; font-size: 14px; font-weight: 600; color: var(--navy); background: #fff; }
.ho-toggle label + label span { border-left: 1.5px solid rgba(23,62,98,.15); }
.ho-toggle .ok input:checked + span { background: var(--ok); color: #fff; }
.ho-toggle .defect input:checked + span { background: var(--err); color: #fff; }
.ho-toggle .na input:checked + span { background: #6b7280; color: #fff; }
.ho-toggle input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: -3px; }
.ho-item-body { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ho-item-other { border-style: dashed; }
.ho-item-custom .ho-item-n { background: var(--gold); color: var(--navy-deep); }
.ho-item-label-edit { flex: 1; min-width: 240px; }
.ho-item-label-edit input { font-weight: 600; color: var(--navy); border-color: rgba(23,62,98,.25); }
.ho-item-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ho-add-custom { padding: 4px 0; }
.ho-defect { border: 1.5px solid rgba(168,50,50,.35); border-left-width: 5px; border-radius: var(--r-sm); padding: 12px 14px; background: #fff; }
.ho-defect-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ho-defect-tag { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--err); }
.ho-photos { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ho-photo { position: relative; margin: 0; width: 120px; height: 90px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0,0,0,.1); }
.ho-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ho-photo button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.ho-photo-add { display: inline-flex; align-items: center; justify-content: center; width: 150px; height: 90px; border: 2px dashed rgba(23,62,98,.3); border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--navy); text-align: center; padding: 6px; background: var(--cream); }
.ho-photo-add input { position: absolute; opacity: 0; width: 0; height: 0; }
.ho-defect-status.is-error { color: var(--err); font-weight: 600; }
.ho-legal { background: var(--cream); border-radius: var(--r-md); padding: 16px 20px; max-height: 260px; overflow-y: auto; font-size: 13.5px; line-height: 1.5; margin-bottom: 18px; }
.ho-legal p { margin: 0 0 8px; }
.ho-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ho-pad-wrap { position: relative; background: #fff; border: 1.5px solid rgba(23,62,98,.25); border-radius: var(--r-md); overflow: hidden; }
.ho-pad { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; background: #fff; }
.ho-pad-line { position: absolute; left: 6%; right: 6%; bottom: 22%; height: 1px; background: rgba(23,62,98,.35); pointer-events: none; }
.ho-pad-hint { position: absolute; left: 6%; bottom: 8%; font-size: 12px; color: var(--text); pointer-events: none; letter-spacing: .08em; text-transform: uppercase; }
.ho-sig.has-signature .ho-pad-wrap { border-color: var(--ok); }
.ho-sig-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.ho-missing { border-radius: var(--r-md); padding: 14px 18px; background: var(--warn-bg); color: var(--warn); margin-bottom: 14px; }
.ho-missing.is-ok { background: var(--ok-bg); color: var(--ok); }
.ho-missing ul { margin: 6px 0 0 18px; padding: 0; }
.ho-final-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn-lg { font-size: 15px; padding: 16px 34px; }
@media (max-width: 900px) {
    .ho-signatures, .form-row-3 { grid-template-columns: 1fr; }
    .ho-steps { top: 66px; }
    .ho-toggle span { min-width: 78px; }
}

/* Übergabe: Gruppen & Prüfhinweise (4.1) */
.ho-group { margin: 14px 0 -2px; padding-bottom: 6px; border-bottom: 2px solid var(--gold, #bda588); color: var(--gold-dark, #a58e70); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ho-group:first-child { margin-top: 0; }
.ho-item-label > span:last-child { display: flex; flex-direction: column; }
.ho-hint { font-weight: 400; font-size: 13px; color: var(--muted, #6b7280); line-height: 1.35; margin-top: 2px; }
.table tr.row-group th { background: var(--cream, #f7f2ec); color: var(--gold-dark, #a58e70); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 8px 12px; }
.ho-item-head .ho-item-label { flex: 1 1 280px; min-width: 0; }
.ho-item-head .ho-toggle { flex-shrink: 0; }

/* Zwei-Faktor-Anmeldung (5.0) */
.mt-sm { margin-top: .5rem; }
.input-code { font-size: 1.5rem; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.steps-list { padding-left: 1.2em; margin: 1rem 0; }
.steps-list li { margin-bottom: .8rem; }
.qr-box { width: 200px; height: 200px; margin: .6rem 0; background: #fff; border: 1px solid rgba(23,62,98,.15); border-radius: var(--r-md); padding: 8px; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.secret-key { font-size: 1rem; letter-spacing: .12em; word-break: break-all; }
.backup-codes { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.backup-codes li { background: var(--cream); border-radius: var(--r-sm, 6px); padding: 10px 12px; text-align: center; }
.backup-codes code { font-size: 1.05rem; letter-spacing: .1em; }
.device-list { list-style: none; padding: 0; margin: 0; }
.device-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(23,62,98,.1); flex-wrap: wrap; }
.device-list li:last-child { border-bottom: 0; }
.device-list .muted { font-size: .85rem; }
@media print { .auth-side, .auth-foot, .btn-row, form, .envbar { display: none !important; } .auth-wrap { display: block; } .auth-card { box-shadow: none; max-width: none; } }

/* System & Fehlerlog (5.0) */
.log-list { display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow: auto; }
.log-line { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm, 6px); background: var(--cream); border-left: 4px solid rgba(23,62,98,.25); font-size: .85rem; }
.log-line pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: .8rem; line-height: 1.4; }
.log-time { color: var(--text); font-variant-numeric: tabular-nums; font-size: .78rem; }
.log-error { border-left-color: #a83232; background: #fdf5f5; }
.log-warn { border-left-color: #c9962b; background: #fdf9ef; }
.log-ok { border-left-color: #2f7d4f; background: #f4faf6; }
@media (max-width: 700px) { .log-line { grid-template-columns: 1fr; gap: 2px; } }
@media (min-width: 901px) and (max-width: 1440px) {
    .mainnav a { padding: 8px 8px; font-size: .64rem; letter-spacing: 1px; white-space: nowrap; }
    .userchip .badge-admin { display: none; }
}
@media (min-width: 901px) and (max-width: 1200px) {
    .userchip .hide-sm { display: none; }
}
@media (min-width: 901px) and (max-width: 1100px) {
    .mainnav a { padding: 8px 6px; font-size: .6rem; letter-spacing: .8px; }
    .userchip { padding: 4px 6px; }
    .userchip .btn-sm { padding: 6px 8px; font-size: .58rem; }
}

/* Sammelaktionen Reklamationen (5.1) */
.col-check { width: 32px; padding-right: 0 !important; }
.col-check input { accent-color: var(--navy); width: 16px; height: 16px; }
.table tr.row-selected td { background: var(--gold-soft); }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 14px; margin: 0 0 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.bulkbar-count { font-size: .8rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.bulkbar-actions { display: grid; grid-template-columns: minmax(220px, 300px) auto; gap: 8px 14px; align-items: center; width: 100%; }
.bulkbar-row { display: contents; }
.bulkbar-btns { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bulkbar select, .bulkbar input[type="text"] { width: 100%; padding: 8px 10px; font-size: .85rem; border-radius: 8px; }
.bulkbar select { padding-right: 30px; background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%; }
.bulkbar .btn-sm { white-space: nowrap; }
.bulkbar .check-inline { margin: 0; font-size: .85rem; gap: 6px; align-items: center; }
.bulkbar .check-inline input { margin: 0; }
@media (max-width: 640px) { .bulkbar-actions { grid-template-columns: 1fr; } .bulkbar-btns { margin-bottom: 6px; } }
.is-invalid { outline: 2px solid var(--err) !important; }
.searchbar-select { border-radius: 999px; padding: 0 18px; max-width: 280px; }
.forward-preview { margin-bottom: 4px; }
.forward-preview + .forward-preview { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.tt-forward { border-left-color: #2f6b5a !important; }
.mail-details summary { cursor: pointer; }
.mail-body { white-space: pre-wrap; font-size: .8rem; background: var(--paper); padding: 10px 12px; border-radius: 8px; margin: 8px 0 0; max-height: 320px; overflow: auto; font-family: inherit; }
.fwd-block { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 8px; }
.fwd-title { font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.fwd-facts { font-size: .88rem; border-collapse: collapse; margin-bottom: 8px; }
.fwd-facts td { padding: 2px 12px 2px 0; vertical-align: top; }
.fwd-facts td:first-child { color: var(--text); white-space: nowrap; }
.fwd-desc { background: var(--paper); border-left: 3px solid var(--gold); padding: 8px 12px; font-size: .88rem; }
/* Reklamationsliste 5.1: Tabelle darf die Karte nicht sprengen */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-tickets td, .table-tickets th { padding-left: 9px; padding-right: 9px; }
.table-tickets .tstatus { white-space: normal; line-height: 1.2; text-align: left; max-width: 180px; }
.table-tickets .tstatus::before { flex: 0 0 7px; }
.table-tickets .row-link { color: var(--dark); }
.table-tickets .row-link:hover { color: var(--navy); text-decoration: underline; }
/* Bankgarantien (5.2) */
.gstate { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.gstate-ok { background: var(--ok-bg); color: var(--ok); }
.gstate-due { background: var(--warn-bg); color: var(--warn); }
.gstate-expired { background: var(--err-bg); color: var(--err); }
.gstate-none { background: #eee; color: #777; }

/* ---- Wissen & Tipps (ab 5.4) ---- */
.faq-search-card { padding-top: 22px; padding-bottom: 22px; }
.faq-search { position: relative; }
.faq-search input[type=search] { padding-left: 46px; font-size: 1rem; min-height: 52px; border-radius: 999px; }
.faq-search-ico { position: absolute; left: 18px; top: 50%; width: 16px; height: 16px; margin-top: -9px; border: 2px solid var(--gold-dark); border-radius: 50%; pointer-events: none; }
.faq-search-ico::after { content: ""; position: absolute; width: 7px; height: 2px; background: var(--gold-dark); right: -6px; bottom: -3px; transform: rotate(45deg); border-radius: 2px; }
.faq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.faq-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--navy); font-size: .8rem; font-weight: 600; }
.faq-chip span { font-size: .7rem; color: var(--gold-dark); font-weight: 700; }
.faq-chip:hover { border-color: var(--gold); background: var(--gold-soft); color: var(--navy); }
.faq-chip.is-hidden { display: none; }
.faq-audience { margin-top: 14px; }
.faq-cat { scroll-margin-top: 100px; }
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--line-soft); scroll-margin-top: 100px; }
.faq-item:last-child { border-bottom: 0; }
.faq-item > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 15px 4px 15px 0; color: var(--navy); font-weight: 600; font-size: 1rem; line-height: 1.45; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: ""; flex: 0 0 auto; width: 9px; height: 9px; margin-left: auto; border-right: 2px solid var(--gold-dark); border-bottom: 2px solid var(--gold-dark); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; }
.faq-item[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq-item > summary:hover { color: var(--gold-dark); }
.faq-item > summary .badge { margin-left: 0; }
.faq-q { flex: 1 1 auto; }
.faq-a { padding: 0 34px 18px 0; color: var(--dark); }
.faq-a p:last-child, .faq-a ul:last-child { margin-bottom: 0; }
.faq-a ul { margin: 0 0 1em; padding-left: 1.2em; }
.faq-a li { margin-bottom: .3em; }
.faq-a li::marker { color: var(--gold-dark); }
.faq-a a { text-decoration: underline; text-decoration-color: rgba(189,165,136,.6); text-underline-offset: 3px; }
.faq-item mark { background: var(--gold-soft); color: inherit; padding: 0 2px; border-radius: 3px; }
.faq-empty { text-align: center; color: var(--dark); }
.faq-contact { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: linear-gradient(135deg, var(--white) 0%, var(--paper) 100%); }
.faq-contact h2 { margin-bottom: .3em; }
.faq-contact p { margin-bottom: .4em; }
.faq-contact .btn-row { margin-top: 0; }
.faq-contact-line a { font-weight: 600; }
.faq-disclaimer { text-align: center; max-width: 760px; margin: 0 auto 10px; }
.faq-preview { border: 1px dashed var(--line); border-radius: var(--r-md); padding: 4px 18px 0; }
.faq-preview .faq-q { color: var(--navy); font-weight: 600; margin: 12px 0 8px; }
.faq-answer-input { font-size: .92rem; line-height: 1.6; }
.faq-format td { padding: 9px 8px; font-size: .85rem; vertical-align: top; }
.faq-format td:first-child { white-space: nowrap; }
.faq-admin-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.faq-admin-actions .inline-form { display: inline-flex; gap: 4px; }
.faq-admin-table .actions .inline-form { display: inline-flex; gap: 4px; }
.btn-icon { padding: 6px 10px; min-width: 34px; font-size: .85rem; letter-spacing: 0; }
.btn-icon[disabled] { opacity: .35; cursor: default; }
.badge-btn { background: none; border: 0; padding: 0; cursor: pointer; }
.badge-btn .badge { margin-left: 0; }
.faq-rename { position: relative; }
.faq-rename > summary { list-style: none; }
.faq-rename > summary::-webkit-details-marker { display: none; }
.faq-rename-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: flex; gap: 8px; width: 380px; max-width: 80vw; background: var(--white); padding: 12px; border-radius: var(--r-md); box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.faq-rename-form input { flex: 1 1 auto; }
@media (max-width: 900px) {
    .faq-chips { flex-wrap: nowrap; overflow-x: auto; margin: 14px -18px 0; padding: 0 18px 4px; scrollbar-width: none; }
    .faq-chips::-webkit-scrollbar { display: none; }
    .faq-chip { flex: 0 0 auto; }
    .faq-a { padding-right: 0; }
    .faq-contact { flex-direction: column; align-items: flex-start; }
    .faq-rename-form { right: auto; left: 0; }
}
@media print { .faq-search-card, .faq-contact { display: none !important; } .faq-item .faq-a { display: block; } }
