:root {
  --bg: #171816;
  --panel: #232521;
  --panel-2: #2d302b;
  --line: #3b3e38;
  --text: #f4f0e7;
  --muted: #aaa99f;
  --orange: #ed7d31;
  --orange-dark: #b95417;
  --green: #68a96b;
  --red: #c95f53;
  --radius: 14px;
}
[data-theme="light"] {
  --bg: #f4f2ed;
  --panel: #ffffff;
  --panel-2: #ece9e2;
  --line: #d8d4ca;
  --text: #1a1a18;
  --muted: #666560;
}
[data-theme="light"] body { background: radial-gradient(circle at 85% 5%, #ffe8d6 0, var(--bg) 28%); }
[data-theme="light"] .topbar { background: rgba(244,242,237,.94); }
[data-theme="light"] .card { background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(240,238,234,.98)); }
[data-theme="light"] .nav-dropdown-menu { background: var(--panel); }
[data-theme="light"] .permission-row > *:first-child { background: rgba(244,242,237,.98); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% 5%, #31271f 0, var(--bg) 28%); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
.topbar { min-height: 70px; padding: 0 max(20px, calc((100vw - 1180px)/2)); display: flex; align-items: center; gap: 32px; border-bottom: 1px solid var(--line); background: rgba(23,24,22,.94); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.brand-logo { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }
nav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; color: var(--muted); }
nav a:hover { color: var(--orange); }
nav form { margin: 0; }
.nav-logout { border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
.inline-date-edit { display:inline; }
.inline-date-edit summary { display:inline; cursor:pointer; font-size:.8rem; color:var(--muted); margin-left:.5rem; list-style:none; }
.inline-date-edit summary::-webkit-details-marker { display:none; }
.inline-date-edit[open] summary { color:var(--orange); }
.inline-date-form { display:inline-flex; gap:.4rem; align-items:center; margin-left:.5rem; flex-wrap:wrap; }
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; padding: 0; }
.nav-dropdown-toggle:hover { color: var(--orange); }
.nav-dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; min-width: 180px; padding: 6px; z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.nav-dropdown.open .nav-dropdown-menu { display: flex; flex-direction: column; }
.nav-dropdown-menu a { padding: 8px 12px; border-radius: 7px; color: var(--text); font-size: 14px; white-space: nowrap; }
.nav-dropdown-menu a:hover { background: var(--panel-2); color: var(--orange); }
.badge { background: var(--orange); color: #171816; border-radius: 20px; padding: 1px 6px; font-weight: 800; }
.badge-warning { display: inline-block; background: rgba(237,125,49,.18); color: var(--orange); border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 800; }
.badge-danger { display: inline-block; background: rgba(201,95,83,.18); color: #ff9b92; border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 800; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); transition: background .15s, color .15s, border-color .15s; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); border-color: var(--orange); }
.menu-button { display: none; margin-left: auto; background: none; border: 0; color: var(--text); font-size: 25px; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 70px; }
.back-button { display: inline-flex; align-items: center; min-height: 38px; margin: -18px 0 18px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; background: rgba(45,48,43,.72); color: var(--muted); cursor: pointer; font: inherit; font-weight: 800; }
.back-button:hover { border-color: var(--orange); color: var(--orange); }
h1 { margin: 3px 0 8px; font-family: Georgia, serif; font-size: clamp(34px, 5vw, 55px); line-height: 1; letter-spacing: -1.5px; }
h2 { margin: 0 0 18px; font-size: 18px; }
h3 { margin-top: 28px; }
p { line-height: 1.6; }
.eyebrow { margin: 0; color: var(--orange); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.7px; }
.muted, small { color: var(--muted); }
.page-heading { min-height: 95px; margin-bottom: 28px; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.card { display: block; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(45,48,43,.82), rgba(31,33,30,.94)); box-shadow: 0 14px 35px rgba(0,0,0,.16); }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.span-2 { grid-column: span 2; }
.section-heading { display: flex; justify-content: space-between; align-items: center; }
.section-heading a { color: var(--orange); font-size: 14px; font-weight: 700; }
.list-row, .event-row, .task-row, .task-detail-row { min-height: 62px; display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line); }
.list-row:first-of-type, .event-row:first-of-type, .task-row:first-of-type, .task-detail-row:first-of-type { border-top: 0; }
.list-row > span:first-child, .task-row > span:nth-child(2), .task-detail-row > span:nth-child(2) { display: flex; flex-direction: column; gap: 4px; }
.list-row time, .task-detail-row time { margin-left: auto; color: var(--muted); }
.list-row:hover strong, .event-row:hover strong, .task-row:hover strong { color: var(--orange); }
.empty { color: var(--muted); padding: 15px 0; }
.status-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.status-dot.active { background: var(--orange); box-shadow: 0 0 0 4px rgba(237,125,49,.13); }
.status-dot.done { background: var(--green); }
.status-dot.planned { background: var(--muted); }
.status-dot.waiting { background: #d8b04c; }
.filetype { margin-left: auto; display: inline-grid; place-items: center; min-width: 44px; padding: 5px 7px; border: 1px solid var(--orange-dark); color: var(--orange); border-radius: 6px; font-size: 11px; font-weight: 800; }
.lift-mini-row { min-height: 74px; display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.lift-mini-row:first-of-type { border-top: 0; }
.lift-mini-row strong { color: var(--orange); }
.lift-mini-row span { font-weight: 800; }
.lift-mini-row small { grid-column: 2; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); cursor: pointer; font: inherit; font-weight: 700; }
.button:hover { border-color: var(--orange); }
.button.primary { border-color: var(--orange); background: var(--orange); color: #1a1815; }
.button.primary:hover { background: #ff9147; }
.button.danger { border-color: var(--red); color: #ffd6d2; background: rgba(192, 57, 43, 0.16); }
.button.danger:hover { background: rgba(192, 57, 43, 0.24); }
.message { margin-bottom: 20px; padding: 13px 16px; border-left: 4px solid var(--green); background: #263528; border-radius: 6px; }
.message.warning { border-left-color: var(--orange); background: #3b2d22; }
.error { color: #ff8c82; }
.app-install-card { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin: -6px 0 24px; border-color: rgba(237,125,49,.55); background: linear-gradient(145deg, rgba(237,125,49,.22), rgba(31,33,30,.94)); }
.app-install-icon { font-size: 34px; }
.app-install-card h2 { margin-bottom: 6px; }
.app-install-card p { margin: 0 0 4px; }
.app-install-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.telegram-invite-card { display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center; margin-bottom: 18px; border-color: rgba(48, 165, 228, .55); background: linear-gradient(145deg, rgba(48,165,228,.18), rgba(31,33,30,.94)); }
.telegram-invite-card h2 { margin: 5px 0 8px; font-family: Georgia, serif; font-size: 28px; }
.telegram-invite-card p { margin: 0 0 12px; }
.telegram-invite-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.telegram-qr { display: grid; place-items: center; padding: 10px; border-radius: 12px; background: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.telegram-qr img { display: block; width: 132px; height: 132px; }
.telegram-profile-card { margin-top: 18px; }
.login-shell { min-height: calc(100vh - 160px); display: grid; grid-template-columns: 1.3fr .7fr; align-items: center; gap: 70px; }
.login-panel h1 { max-width: 680px; font-size: clamp(48px, 8vw, 90px); }
.login-panel .muted { max-width: 550px; font-size: 18px; }
.login-logo { display: block; width: min(280px, 72vw); height: auto; margin: 0 0 28px; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
.login-card { padding: 35px; }
.login-card label, .field label { display: block; margin: 16px 0 7px; font-size: 13px; font-weight: 700; }
input, textarea, select { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 7px; background: #171916; color: var(--text); font: inherit; }
.field .date-part, .field .time-part { display: inline-block; width: calc(50% - 6px); }
.field .date-part { margin-right: 8px; }
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(237,125,49,.25); border-color: var(--orange); }
.login-card .button { width: 100%; margin-top: 22px; }
.form-card { max-width: 760px; }
.field { margin-bottom: 18px; }
.select-search-wrap { display: grid; gap: 8px; }
.select-search-label { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; }
.select-search-input { border-color: rgba(237,125,49,.45); }
.visually-hidden-select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.multi-click-list { display: grid; gap: 8px; max-height: 280px; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #171916; }
.single-click-list { max-height: 160px; }
.vehicle-click-list { max-height: 160px; }
.multi-click-option { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2); color: var(--text); text-align: left; font: inherit; font-weight: 700; cursor: pointer; }
.multi-click-option:hover { border-color: var(--orange); }
.multi-click-option.selected { border-color: var(--orange); background: rgba(237,125,49,.2); color: #ffd3b4; }
.vehicle-select { min-height: 180px; }
.checkbox-row { margin: 13px 0; display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: auto; }
.checkbox-row label { order: 2; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.member-card { display: flex; align-items: center; gap: 15px; }
.member-card > span:last-child { display: flex; flex-direction: column; }
.avatar { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--orange); color: #191713; font-family: Georgia, serif; font-size: 18px; font-weight: 800; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #5cb85c; margin-left: 5px; vertical-align: middle; box-shadow: 0 0 0 2px rgba(92,184,92,.25); }
.detail-card { max-width: 720px; }
dl { display: grid; grid-template-columns: 160px 1fr; gap: 15px; }
dt { color: var(--muted); } dd { margin: 0; }
.date-tile { width: 48px; height: 48px; display: grid; place-content: center; text-align: center; border: 1px solid var(--orange-dark); border-radius: 7px; color: var(--orange); }
.date-tile strong { font-size: 20px; line-height: 18px; }
.date-tile small { color: var(--orange); text-transform: uppercase; font-size: 10px; }
.event-row > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.event-row-work-order, .appointment-row-work-order { position: relative; padding-left: 16px; border-radius: 8px; background: linear-gradient(90deg, rgba(237,125,49,.22), rgba(237,125,49,.07) 58%, transparent); }
.event-row-work-order::before, .appointment-row-work-order::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 6px; border-radius: 999px; background: var(--orange); box-shadow: 0 0 0 3px rgba(237,125,49,.14); }
.event-row-work-order .date-tile { border-color: var(--orange); color: #ffd3b4; background: rgba(237,125,49,.2); }
.event-row-work-order .date-tile small { color: #ffd3b4; }
.appointment-type { display: inline-flex; align-items: center; margin-right: 8px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 800; }
.event-row-work-order .appointment-type, .appointment-row-work-order .appointment-type { border-color: rgba(237,125,49,.75); color: #ffd3b4; background: rgba(237,125,49,.24); }
.content-grid { display: grid; grid-template-columns: 1.5fr .8fr; gap: 18px; }
.response-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.project-card { min-height: 210px; transition: transform .15s, border-color .15s; }
.project-card:hover { transform: translateY(-3px); border-color: var(--orange-dark); }
.project-icon { color: var(--orange); font-size: 28px; }
.project-card h2 { margin: 22px 0 8px; }
.filterbar { margin-bottom: 18px; display: grid; grid-template-columns: 1fr 250px auto; gap: 10px; }
.task-filter-card { margin-bottom: 18px; }
.task-filterbar { display: grid; grid-template-columns: 1fr 220px auto auto; gap: 10px; }
.task-summary { max-width: 760px; margin-bottom: 18px; }
.permission-overview { overflow-x: auto; }
.permission-table { min-width: calc(260px + var(--perm-cols, 8) * 120px); display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.permission-row { display: grid; grid-template-columns: 260px repeat(var(--perm-cols, 8), minmax(115px, 1fr)); gap: 1px; background: var(--line); }
.permission-row > * { background: rgba(31,33,30,.96); padding: 13px; }
.permission-head > * { color: var(--orange); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; word-break: break-word; hyphens: auto; }
.permission-row > *:first-child { position: sticky; left: 0; z-index: 1; background: rgba(31,33,30,.98); box-shadow: 3px 0 6px rgba(0,0,0,.4); }
.permission-member { display: flex; align-items: center; gap: 12px; }
.permission-member > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.permission-group { border: 0; }
.permission-group summary { cursor: pointer; list-style: none; }
.permission-group summary::-webkit-details-marker { display: none; }
.permission-group summary span { display: inline-flex; min-width: 54px; min-height: 32px; align-items: center; justify-content: center; border-radius: 999px; font-weight: 900; background: var(--panel-2); color: var(--muted); }
.permission-group.all summary span { background: rgba(104,169,107,.2); color: #bde8bf; }
.permission-group.some summary span { background: rgba(237,125,49,.2); color: #ffd3b4; }
.permission-group.none summary span { background: rgba(201,95,83,.12); color: #ffb5ad; }
.permission-detail-list { display: grid; gap: 6px; margin-top: 10px; }
.permission-pill { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; line-height: 1.25; }
.permission-pill.allowed { color: #d8f3d9; }
.permission-edit-link { color: var(--orange); }
.permissions-edit-form { display: grid; gap: 18px; }
.permissions-edit-card { max-width: 1040px; }
.permissions-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.permission-checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 8px 16px; }
.permissions-field-grid { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 14px; }
.permission-select-field label { margin-top: 0; }
.sticky-actions { position: sticky; bottom: 0; max-width: 1040px; padding: 14px 0; background: linear-gradient(180deg, rgba(23,24,22,0), var(--bg) 30%); }
.role-list { display: grid; gap: 1px; padding: 0; overflow: hidden; }
.role-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 18px 22px; border-top: 1px solid var(--line); }
.role-row:first-child { border-top: 0; }
.role-row > a { display: flex; flex-direction: column; gap: 5px; }
.role-row:hover strong { color: var(--orange); }
.vehicle-filter-panel { margin: -8px 0 24px; }
.vehicle-search { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; margin: 0 0 16px; }
.vehicle-search input[type="search"] { min-height: 48px; font-weight: 700; }
.vehicle-filter-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.vehicle-filter-card { min-height: 145px; display: flex; flex-direction: column; gap: 8px; transition: transform .15s, border-color .15s, background .15s; }
.vehicle-filter-card:hover { transform: translateY(-3px); border-color: var(--orange); }
.vehicle-filter-card strong { font-family: Georgia, serif; font-size: 25px; }
.vehicle-filter-card.active { border-color: var(--orange); background: linear-gradient(145deg, rgba(237,125,49,.24), rgba(31,33,30,.96)); box-shadow: 0 0 0 1px rgba(237,125,49,.2), 0 14px 35px rgba(0,0,0,.18); }
.vehicle-type-filter { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(35,37,33,.72); }
.vehicle-type-filter > span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.vehicle-type-filter > div { display: flex; flex-wrap: wrap; gap: 10px; }
.vehicle-filter-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); font-weight: 800; }
.vehicle-filter-pill:hover { border-color: var(--orange); }
.vehicle-filter-pill.active { border-color: var(--orange); background: var(--orange); color: #1a1815; }
.document-row { min-height: 72px; display: flex; align-items: center; border-top: 1px solid var(--line); }
.document-row:first-child { border-top: 0; }
.document-row > a { flex: 1; display: flex; align-items: center; gap: 14px; }
.document-row > a > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.document-row .filetype { margin: 0; }
.document-folder-panel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: -8px 0 18px; }
.document-folder-card { min-height: 135px; display: flex; flex-direction: column; gap: 8px; transition: transform .15s, border-color .15s, background .15s; }
.document-folder-card:hover { transform: translateY(-3px); border-color: var(--orange); }
.document-folder-card.active { border-color: var(--orange); background: linear-gradient(145deg, rgba(237,125,49,.24), rgba(31,33,30,.96)); }
.document-folder-card strong { font-family: Georgia, serif; font-size: 24px; }
.document-folder-icon { font-size: 30px; }
.text-button { border: 0; background: none; color: var(--red); cursor: pointer; }
.ocr-text { max-height: 320px; overflow: auto; white-space: pre-wrap; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #171916; color: var(--muted); }
.status-pill { padding: 5px 9px; border-radius: 999px; background: rgba(230, 126, 34, 0.16); color: var(--orange); font-size: 12px; font-weight: 800; }
.scan-progress { margin: 14px 0 0; }
.invite-status { margin-left: auto; padding: 5px 9px; border-radius: 20px; background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 800; }
.status-offen { color: var(--orange); }
.status-angenommen { color: var(--green); }
.status-abgelaufen { color: var(--red); }
.invite-result { max-width: 820px; }
.conversation-list { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.conversation-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 18px 22px; border-top: 1px solid var(--line); }
.conversation-row:first-child { border-top: 0; }
.conversation-row.unread { background: rgba(237,125,49,.1); }
.conversation-row strong { color: var(--text); }
.conversation-row small, .conversation-row time { color: var(--muted); }
.conversation-row p { margin: 8px 0 0; color: var(--muted); }
.conversation-thread { display: flex; flex-direction: column; gap: 14px; }
.conversation-message { max-width: 78%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.conversation-message.own { align-self: flex-end; border-color: rgba(237,125,49,.6); background: rgba(237,125,49,.12); }
.conversation-message header { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.conversation-message p { margin: 0; }
.conversation-reply { margin-top: 18px; }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 20px 0; }
.workshop-tabs { display: flex; gap: 10px; margin: -10px 0 24px; }
.workshop-tabs a { padding: 9px 13px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); }
.workshop-tabs a:hover { color: var(--orange); border-color: var(--orange-dark); }
.schedule-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: -6px 0 18px; }
.lift-schedule { overflow-x: auto; }
.lift-schedule-grid { min-width: 700px; display: grid; grid-template-columns: 130px repeat(7, minmax(110px, 1fr)); border-top: 1px solid var(--line); }
.lift-schedule-grid:first-child { border-top: 0; }
.lift-schedule-grid > * { min-height: 80px; padding: 10px 8px; border-left: 1px solid var(--line); }
.lift-schedule-grid > *:first-child { border-left: 0; }
.lift-schedule-head > strong { min-height: 44px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; display: flex; flex-direction: column; gap: 3px; }
.lift-schedule-head > strong span { font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--text); }
.lift-label { display: flex; align-items: center; font-weight: 800; font-size: .9rem; color: var(--orange); }
.lift-label-muted { color: var(--muted); font-size: .85rem; }
.lift-nolift-row { border-top: 2px dashed var(--line); }
.lift-day { display: flex; flex-direction: column; gap: 6px; }
.lift-free { display: flex; align-items: center; justify-content: center; min-height: 36px; border: 1px dashed rgba(104,169,107,.35); border-radius: 7px; color: rgba(104,169,107,.6); font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.lift-free-muted { border-color: var(--line); color: var(--muted); }
.lift-booking { display: flex; flex-direction: column; gap: 2px; padding: 7px 8px; border: 1px solid rgba(237,125,49,.5); border-radius: 7px; background: rgba(237,125,49,.1); text-decoration: none; color: inherit; transition: background .15s; }
.lift-booking:hover { background: rgba(237,125,49,.2); }
.lift-booking-nolift { border-color: rgba(74,143,194,.45); background: rgba(74,143,194,.08); }
.lift-booking-nolift:hover { background: rgba(74,143,194,.16); }
.lift-booking-time { font-size: 11px; color: #ffd3b4; font-weight: 700; letter-spacing: .3px; }
.lift-booking-nolift .lift-booking-time { color: #8bbcdc; }
.lift-booking-title { font-size: 12px; font-weight: 800; line-height: 1.3; word-break: break-word; }
.lift-booking-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.lift-today { background: rgba(237,125,49,.07) !important; }
.lift-schedule-head .lift-today { color: var(--orange); font-weight: 800; }
.lift-schedule-head .lift-today span { color: var(--orange); }
.vehicle-card { min-height: 260px; display: flex; flex-direction: column; transition: transform .15s, border-color .15s, background .15s; position: relative; overflow: hidden; }
.vehicle-card:hover { transform: translateY(-3px); border-color: var(--orange-dark); }
.vehicle-card::after { content: ""; position: absolute; inset: auto -35px -55px auto; width: 135px; height: 135px; border-radius: 50%; background: rgba(237,125,49,.08); pointer-events: none; }
.vehicle-cover { height: 145px; margin: -24px -24px 18px; background: linear-gradient(145deg, rgba(237,125,49,.16), rgba(0,0,0,.25)); border-bottom: 1px solid var(--line); overflow: hidden; }
.vehicle-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.vehicle-card:hover .vehicle-cover img { transform: scale(1.04); }
.vehicle-detail-image { width: 100%; max-height: 320px; margin: -4px 0 22px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; }
.vehicle-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.vehicle-type-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: rgba(237,125,49,.13); font-size: 30px; }
.vehicle-owner-badge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; border: 1px solid var(--line); background: rgba(23,25,22,.72); color: var(--muted); font-size: 12px; font-weight: 800; }
.vehicle-owner-badge.ownership-private { border-color: rgba(104,169,107,.45); color: #9fcea1; }
.vehicle-owner-badge.ownership-customer { border-color: rgba(237,125,49,.5); color: var(--orange); }
.vehicle-owner-badge.ownership-community { border-color: rgba(244,240,231,.32); color: var(--text); }
.vehicle-kind { color: var(--orange); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.vehicle-card h2 { margin: 12px 0 4px; font-family: Georgia, serif; font-size: 28px; }
.vehicle-model-line { min-height: 28px; margin: 0 0 12px; color: var(--muted); }
.vehicle-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.vehicle-meta span { padding: 5px 8px; border-radius: 7px; background: rgba(255,255,255,.05); color: var(--muted); font-size: 12px; font-weight: 700; }
.vehicle-due-row { display: flex; flex-wrap: wrap; gap: 8px; min-height: 30px; margin-top: 14px; }
.due-chip { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); font-size: 12px; font-weight: 800; }
.due-chip.ok { border-color: rgba(104,169,107,.45); color: #9fcea1; }
.due-chip.soon { border-color: rgba(237,125,49,.65); color: var(--orange); background: rgba(237,125,49,.1); }
.due-chip.overdue { border-color: rgba(201,95,83,.8); color: #ff9b92; background: rgba(201,95,83,.12); }
.view-toggle { display: flex; gap: 2px; }
.view-toggle-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 17px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; line-height: 1; }
.view-toggle-btn:hover { background: var(--panel-2); color: var(--text); }
.view-toggle-btn.active { background: rgba(237,125,49,.15); border-color: rgba(237,125,49,.5); color: var(--orange); }
.vehicle-name-group { display: flex; flex-direction: column; min-width: 0; }
.vehicle-list-view { display: flex; flex-direction: column; gap: 6px; }
.vehicle-list-view .vehicle-card { min-height: unset; flex-direction: row; align-items: center; gap: 14px; padding: 12px 16px; overflow: visible; }
.vehicle-list-view .vehicle-card::after { display: none; }
.vehicle-list-view .vehicle-card:hover { transform: none; background: var(--panel-2); }
.vehicle-list-view .vehicle-cover { display: none; }
.vehicle-list-view .vehicle-card-top { margin-bottom: 0; flex: 0 0 auto; }
.vehicle-list-view .vehicle-type-icon { width: 40px; height: 40px; border-radius: 12px; font-size: 22px; }
.vehicle-list-view .vehicle-owner-badge { display: none; }
.vehicle-list-view .vehicle-name-group { flex: 1; }
.vehicle-list-view .vehicle-kind { display: none; }
.vehicle-list-view .vehicle-card h2 { font-size: 15px; font-family: inherit; font-weight: 700; margin: 0 0 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vehicle-list-view .vehicle-model-line { min-height: unset; margin: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vehicle-list-view .vehicle-meta { margin-top: 0; gap: 5px; }
.vehicle-list-view .vehicle-meta span { padding: 3px 7px; }
.vehicle-list-view .vehicle-due-row { margin-top: 0; min-height: unset; flex-wrap: nowrap; }
.heading-actions { display: flex; gap: 8px; }
.workshop-section { margin-top: 18px; }
.maintenance-row { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.maintenance-row:first-of-type { border-top: 0; }
.maintenance-row span { display: flex; flex-direction: column; }
.maintenance-row p { margin-bottom: 0; }
.stock-low { color: #ff8c82; background: rgba(201,95,83,.08); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: rgba(237,125,49,.06); }
.order-total { display: flex; justify-content: space-between; margin-top: 24px; padding-top: 18px; border-top: 2px solid var(--orange-dark); font-size: 19px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ownership-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ownership-card { min-height: 260px; display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
.ownership-card:hover { transform: translateY(-4px); border-color: var(--orange); }
.ownership-icon { font-size: 36px; }
.ownership-card h2 { margin: 28px 0 4px; font-family: Georgia, serif; font-size: 28px; }
.ownership-card p { color: var(--muted); }
.ownership-next { margin-top: auto; color: var(--orange); font-weight: 800; }
ul.errorlist { color: #ff8c82; }
ul#id_helpers { list-style: none; padding: 0; }
ul#id_helpers label { display: flex; gap: 8px; align-items: center; }
ul#id_helpers input { width: auto; }
/* Changelog */
.changelog-entry { margin-bottom: 1rem; }
.changelog-header { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.changelog-version { background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.changelog-title { font-size: 18px; font-weight: 700; margin: 0; flex: 1; }
.changelog-date { font-size: 13px; }
.changelog-actions { display: flex; gap: .5rem; margin-left: auto; }
.changelog-body { color: var(--text); line-height: 1.7; white-space: pre-wrap; }
/* Kanban */
.kanban-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: start; margin-top: 1rem; }
.kanban-column { background: var(--panel); border-radius: 10px; padding: 1rem; }
.kanban-column-title { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.kanban-count { background: var(--border); color: var(--text); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.kanban-card { display: flex; flex-direction: column; gap: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: .5rem; text-decoration: none; color: var(--text); transition: border-color .15s; }
.kanban-card:hover { border-color: var(--accent); }
.kanban-card strong { font-size: 14px; }
.kanban-card small { font-size: 12px; color: var(--muted); }
.kanban-assignee { font-size: 12px; color: var(--accent); }
.kanban-due { font-size: 11px; color: var(--muted); }
.kanban-done { opacity: .5; }
/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.5rem 0; }
@media (max-width: 850px) {
  .kanban-board { grid-template-columns: 1fr; }
}
@media (max-width: 850px) {
  .workshop-tabs { flex-wrap: wrap; row-gap: 6px; }
  .vehicle-search { grid-template-columns: 1fr 1fr; }
  .vehicle-search input[type="search"] { grid-column: 1 / -1; }
}
@media (max-width: 850px) {
  .topbar { padding: 0 20px; }
  .menu-button { display: block; }
  nav { display: none; position: absolute; top: 69px; left: 0; right: 0; padding: 20px; background: var(--panel); flex-direction: column; align-items: flex-start; }
  .menu-open nav { display: flex; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle { width: 100%; text-align: left; }
  .nav-dropdown-menu { position: static; border: 0; border-radius: 0; box-shadow: none; background: none; padding: 0 0 0 12px; display: flex; flex-direction: column; }
  .nav-dropdown.open .nav-dropdown-menu, .nav-dropdown-menu { display: flex; }
  .nav-dropdown-menu a { padding: 6px 0; }
  .dashboard-grid, .content-grid, .login-shell { grid-template-columns: 1fr; }
  .app-install-card { grid-template-columns: 1fr; }
  .app-install-actions { justify-content: flex-start; }
  .telegram-invite-card { grid-template-columns: 1fr; }
  .telegram-qr { justify-self: start; }
  .task-filterbar { grid-template-columns: 1fr; }
  .permissions-edit-grid, .permission-checkbox-grid, .permissions-field-grid { grid-template-columns: 1fr; }
  .login-shell { gap: 25px; }
  .login-panel h1 { font-size: 52px; }
  .span-2 { grid-column: auto; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .ownership-grid, .vehicle-filter-cards, .document-folder-panel { grid-template-columns: 1fr; }
  .vehicle-search { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .container { width: min(100% - 24px, 1180px); padding-top: 25px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { flex-wrap: wrap; }
  .vehicle-search { grid-template-columns: 1fr; }
  .workshop-tabs { gap: 6px; }
  .card-grid { grid-template-columns: 1fr; }
  .vehicle-list-view .vehicle-meta { display: none; }
  .vehicle-list-view .vehicle-model-line { display: none; }
  .filterbar { grid-template-columns: 1fr; }
  .field .date-part, .field .time-part { width: 100%; margin-right: 0; }
  .field .time-part { margin-top: 8px; }
  .vehicle-cover { margin: -18px -18px 18px; }
  .copy-row { grid-template-columns: 1fr; }
  dl { grid-template-columns: 1fr; gap: 4px; }
  dd { margin-bottom: 12px; }
  .card { padding: 18px; }
  /* Inline date form: untereinander auf kleinen Screens */
  .inline-date-form { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; margin-top: .4rem; margin-left: 0; }
  /* Hebebühnen-Grid: kompakter auf Mobilgeräten */
  .lift-schedule-grid { grid-template-columns: 90px repeat(7, minmax(80px, 1fr)); min-width: 500px; }
  /* Membership Year: horizontal scroll */
  .membership-year-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Task-Detail-Row: Status-Button in neue Zeile */
  .task-detail-row { flex-wrap: wrap; }
  .task-detail-row form { margin-left: 0 !important; width: 100%; }
  .task-detail-row form button { width: 100%; }
  /* Suche in Topbar ausblenden auf sehr kleinen Screens */
  .topbar-search { display: none; }
}
@media (max-width: 400px) {
  /* Noch kleinere Screens: Hebebühne nur 3 Tage zeigen */
  .lift-schedule-grid { grid-template-columns: 80px repeat(7, minmax(70px, 1fr)); }
  h1 { font-size: clamp(22px, 6vw, 34px); }
}
