:root {
    --bg: #f3f4f6;
    --surface: #ffffff;
    --surface-2: #f8f9fa;
    --border: #dfe2e6;
    --text: #1e2329;
    --muted: #69717c;
    --accent: #a61f2d;
    --accent-dark: #861924;
    --positive: #237a45;
    --sidebar: #20242a;
    --sidebar-text: #d7dbe0;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Arial, Helvetica, sans-serif; color: var(--text); background: var(--bg); font-size: 14px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); padding: 24px 16px; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 240px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; }
.brand-mark { width: 5px; height: 34px; background: var(--accent); display: block; border-radius: 1px; }
.brand strong, .brand small { display: block; }
.brand strong { color: white; font-size: 16px; }
.brand small { color: #9ca3ad; margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { color: var(--sidebar-text); padding: 10px 12px; border-radius: 4px; font-weight: 600; }
.nav a:hover { background: #2c3138; text-decoration: none; }
.nav a.active { background: #343a42; color: white; border-left: 3px solid var(--accent); padding-left: 9px; }
.nav-section { margin: 22px 12px 6px; color: #8f97a1; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.sidebar-footer { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid #353b43; display: flex; justify-content: space-between; gap: 10px; color: #aeb5be; font-size: 12px; }
.link-button { border: 0; background: transparent; color: #cfd4da; padding: 0; cursor: pointer; }
.content { grid-column: 2; padding: 30px 34px 60px; max-width: 1600px; width: 100%; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 22px; }
h1 { margin: 0; font-size: 25px; line-height: 1.25; }
h2 { margin: 0 0 4px; font-size: 17px; }
p { color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
.header-actions, .form-actions { display: flex; gap: 10px; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 14px; border-radius: 4px; border: 1px solid transparent; font-weight: 700; cursor: pointer; font-size: 13px; }
.button:hover { text-decoration: none; }
.button.primary { color: white; background: var(--accent); border-color: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { color: var(--text); background: white; border-color: var(--border); }
.button.full { width: 100%; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: white; border: 1px solid var(--border); border-radius: 6px; padding: 18px 20px; }
.stat-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.stat-card strong { display: block; font-size: 28px; margin-top: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid #eceef0; vertical-align: middle; }
tbody tr:hover { background: #fafafa; }
td small { display: block; color: var(--muted); margin-top: 3px; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.actions { text-align: right; white-space: nowrap; }
tfoot td { font-weight: 700; background: var(--surface-2); }
.empty-state { color: var(--muted); text-align: center; padding: 32px; }
.status { display: inline-block; padding: 4px 8px; border-radius: 3px; background: #eceff2; color: #4d5560; font-size: 12px; font-weight: 700; }
.status-accepted { background: #e5f3ea; color: #22643d; }
.status-declined, .status-expired { background: #f3e8e9; color: #87303a; }
.status-sent { background: #e9eef8; color: #355b91; }
.progress { width: 150px; max-width: 100%; height: 8px; border-radius: 4px; overflow: hidden; background: #e4e7ea; margin-bottom: 4px; }
.progress span { display: block; height: 100%; background: var(--accent); }
.progress.large { width: 100%; height: 12px; margin: 18px 0; }
.positive { color: var(--positive); font-weight: 700; }
.message { padding: 12px 14px; background: #edf5ef; color: #275f3b; border: 1px solid #cfe1d4; border-radius: 4px; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.form-grid.single-column { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label, .stack-form label { font-weight: 700; font-size: 12px; color: #40464e; }
.field-checkbox { justify-content: flex-end; }
.field-checkbox label { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.input, input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=file], select, textarea { width: 100%; min-height: 38px; border: 1px solid #cfd4d9; border-radius: 4px; padding: 8px 10px; background: white; color: var(--text); font: inherit; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(166,31,45,.15); border-color: var(--accent); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.required { color: var(--accent); margin-left: 3px; }
.field-error, .form-errors { color: #9b2632; font-size: 12px; }
.form-errors { padding: 12px; background: #f8ebed; border: 1px solid #e6c6ca; border-radius: 4px; }
.full-row { grid-column: 1 / -1; }
.form-actions { margin-top: 18px; justify-content: flex-end; }
.filter-bar { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(180px, 260px) auto; gap: 10px; margin-bottom: 16px; }
.two-column, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.detail-list { display: grid; grid-template-columns: 160px minmax(0,1fr); column-gap: 18px; row-gap: 0; margin: 12px 0 0; }
.detail-list dt, .detail-list dd { margin: 0; padding: 9px 0; border-bottom: 1px solid #eceef0; }
.detail-list dt { color: var(--muted); padding-right: 8px; }
.detail-list dd { min-width: 0; }
.detail-grid > div { min-width: 0; }
.detail-grid > div > span { display: block; margin-bottom: 5px; color: var(--muted); }
.detail-grid > div > strong, .detail-grid > div > a { display: inline-block; }
.metric-large span { display: block; color: var(--muted); }
.metric-large strong { display: block; font-size: 28px; margin-top: 8px; }
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.stack-form p { margin: 0; }
.stack-form p label { display: block; margin-bottom: 7px; }
.form-table input, .form-table select { min-width: 80px; }
.form-table td:nth-child(2) select { min-width: 180px; }
.form-table td:nth-child(3) input { min-width: 240px; }
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-card { width: 100%; max-width: 390px; background: white; border: 1px solid var(--border); border-radius: 6px; padding: 28px; box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.login-brand { padding-left: 0; }
.login-brand strong { color: var(--text); }
.login-card h1 { margin: 8px 0 20px; }
@media (max-width: 1000px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid, .two-column, .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .app-shell { display: block; }
    .sidebar { position: static; width: auto; }
    .content { padding: 22px 16px 50px; }
    .nav { display: grid; grid-template-columns: repeat(2, 1fr); }
    .nav-section { grid-column: 1 / -1; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .page-header, .panel-header { flex-direction: column; }
    .filter-bar { grid-template-columns: 1fr; }
}

/* Version 0.2 */
.brand-logo { width: 42px; height: 42px; object-fit: contain; background: white; border-radius: 4px; padding: 3px; }
.login-logo { width: 70px; height: 70px; object-fit: contain; margin-right: 4px; }
.help-label { cursor: help; text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: #9aa1aa; text-underline-offset: 3px; }
.field[hidden] { display: none !important; }
.dashboard-layout { display: flex; flex-direction: column; }
.dashboard-widget { width: 100%; }
.widget-settings { display: flex; flex-direction: column; gap: 10px; }
.widget-setting { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-2); cursor: move; }
.widget-setting.dragging { opacity: .55; }
.widget-setting label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.widget-move { color: var(--muted); font-size: 12px; }
.material-search { min-width: 190px; margin-bottom: 6px; }
.offer-position-table td { vertical-align: top; }
.offer-position-table .position-cell { width: 50px; font-weight: 700; padding-top: 22px; }
.offer-position-table td:nth-child(2) select { min-width: 210px; }
.offer-position-table td:nth-child(3) input { min-width: 260px; }
.muted { color: var(--muted); }
.stat-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.filter-bar-simple { grid-template-columns: minmax(240px, 1fr) auto; }
@media (max-width: 1000px) {
    .widget-setting { grid-template-columns: 90px 1fr auto; }
}
@media (max-width: 760px) {
    .widget-setting { grid-template-columns: 1fr; gap: 8px; }
    .stat-grid-three { grid-template-columns: 1fr; }
}

/* Materialsuche in Angebotspositionen */
.material-picker-cell { min-width: 260px; }
.material-picker { position: relative; min-width: 240px; }
.material-search { min-width: 240px; margin-bottom: 4px; }
.material-select-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.material-suggestions { position: absolute; z-index: 30; top: 42px; left: 0; right: 0; max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.material-suggestion { display: block; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid #eceef0; background: #fff; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.material-suggestion:last-child { border-bottom: 0; }
.material-suggestion:hover, .material-suggestion.active { background: var(--surface-2); }
.material-suggestion-empty { padding: 10px 12px; color: var(--muted); }
.selected-material { min-height: 18px; font-size: 12px; }

.document-text { margin: 0; line-height: 1.55; white-space: normal; }

/* Version 0.3 – Aufträge und Verfügbarkeit */
.stat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.message.error { background: #f8ebed; color: #8e2632; border-color: #e6c6ca; }
.message.warning { background: #fbf4e3; color: #74520c; border-color: #ead9a6; }
.message.info { background: #eaf0f7; color: #2f547d; border-color: #cbd9e8; }
.message a { color: inherit; font-weight: 700; }
.availability-ok, .availability-warning, .availability-conflict { display: inline-block; padding: 4px 8px; border-radius: 3px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.availability-ok { color: #22643d; background: #e5f3ea; }
.availability-warning { color: #74520c; background: #fbf4e3; }
.availability-conflict { color: #87303a; background: #f3e8e9; }
.availability-filter { display: grid; grid-template-columns: minmax(190px, 240px) minmax(190px, 240px) minmax(240px, 1fr) minmax(180px, 220px) auto; gap: 16px; align-items: end; }
.field-submit { justify-content: flex-end; }
.status-reserved { background: #e9eef8; color: #355b91; }
.status-prepared { background: #f5eedf; color: #78591e; }
.status-out { background: #f3e8e9; color: #87303a; }
.status-returned, .status-completed { background: #e5f3ea; color: #22643d; }
.status-cancelled { background: #eceff2; color: #59616b; }
@media (max-width: 1150px) {
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .availability-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .availability-filter { grid-template-columns: 1fr; }
}

/* Version 0.4 – Materialauswahl und Überbuchung */
.material-picker-controls { display: flex; gap: 8px; align-items: flex-start; }
.button.small { padding: 8px 10px; font-size: 12px; }
.material-availability { margin-top: 4px; min-height: 18px; font-size: 12px; }
.offer-position-table td:nth-child(9) input { min-width: 220px; }
.material-suggestion strong { display: inline-block; margin-right: 4px; }
.material-suggestion small { display: block; margin-top: 3px; color: var(--muted); }
.material-modal { width: min(1100px, 95vw); border: 0; border-radius: 8px; padding: 0; box-shadow: 0 18px 45px rgba(0,0,0,.22); }
.material-modal::backdrop { background: rgba(17, 22, 28, .55); }
.material-modal .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.material-modal .modal-header h2 { margin: 0; font-size: 22px; }
.material-modal .modal-body { padding: 18px 22px 22px; }
.commitment-list { display: grid; gap: 8px; min-width: 290px; }
.commitment-item { padding: 8px 10px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-2); font-size: 13px; }
@media (max-width: 900px) {
    .material-picker-controls { flex-direction: column; }
    .material-picker-controls .button { width: 100%; }
}

/* Version 0.5 – Kommissionierung, Ausgabe und Rückgabe */
.availability-filter { grid-template-columns: minmax(190px, 240px) minmax(190px, 240px) minmax(220px, 1fr) minmax(180px, 240px) auto; }
.order-actions { flex-wrap: wrap; justify-content: flex-end; }
.processing-table input[type="number"] { min-width: 95px; }
.processing-table input[type="text"] { min-width: 220px; }
.processing-table td { vertical-align: top; }
.hidden-field { display: none; }
.information-panel p { max-width: 980px; line-height: 1.55; }
.processing-row[data-item-type="consumable"] { background: #faf7ef; }
@media (max-width: 1280px) {
    .availability-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .availability-filter { grid-template-columns: 1fr; }
    .order-actions { justify-content: flex-start; }
}

/* Version 0.6 – Materialübersicht und Rechnungen */
.material-toolbar-panel { display: grid; gap: 18px; }
.category-quick-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.category-chip { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-2); color: var(--text); text-decoration: none; font-size: 13px; font-weight: 700; }
.category-chip:hover, .category-chip.active { border-color: var(--accent); color: var(--accent); background: #fbf4f5; }
.material-filter-grid { display: grid; grid-template-columns: minmax(230px, 1.4fr) minmax(180px, 1fr) minmax(160px, .8fr) minmax(170px, .8fr) minmax(170px, .8fr) auto; gap: 14px; align-items: end; }
.selection-summary { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); }
.material-group { margin-top: 18px; }
.material-overview-table th, .material-overview-table td { white-space: nowrap; }
.material-overview-table td:nth-child(2) { white-space: normal; min-width: 210px; }
.invoice-filter-grid { display: grid; grid-template-columns: minmax(260px, 1fr) 180px 220px auto; gap: 16px; align-items: end; }
.status-draft { background: #eceff2; color: #59616b; }
.status-issued { background: #e9eef8; color: #355b91; }
.status-cancelled { background: #f3e8e9; color: #87303a; }
@media (max-width: 1250px) {
    .material-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .invoice-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .material-filter-grid, .invoice-filter-grid { grid-template-columns: 1fr; }
    .selection-summary { align-items: flex-start; flex-direction: column; gap: 4px; }
}
.inline-form { display: inline-flex; margin: 0; }

/* Version 0.7 – Werkstatt, Seriennummern und Export */
.workshop-stats { margin-bottom: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.workshop-filter { grid-template-columns: minmax(280px, 1fr) minmax(180px, 240px) minmax(180px, 240px) auto; }
.priority { display: inline-block; padding: 4px 8px; border-radius: 3px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.priority-low { background: #eceff2; color: #59616b; }
.priority-normal { background: #eaf0f7; color: #355b91; }
.priority-high { background: #fbf4e3; color: #74520c; }
.priority-urgent { background: #f3e8e9; color: #87303a; }
.status-workshop-open, .status-workshop-diagnosis { background: #eaf0f7; color: #355b91; }
.status-workshop-waiting_parts { background: #fbf4e3; color: #74520c; }
.status-workshop-repair, .status-workshop-external { background: #f3e8e9; color: #87303a; }
.status-workshop-completed, .status-workshop-done { background: #e5f3ea; color: #22643d; }
.status-workshop-not_repairable { background: #eceff2; color: #59616b; }
.status-unit-available { background: #e5f3ea; color: #22643d; }
.status-unit-defective { background: #f3e8e9; color: #87303a; }
.status-unit-blocked, .status-unit-retired { background: #eceff2; color: #59616b; }
.export-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.export-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-2); color: var(--text); text-decoration: none; }
.export-card:hover { border-color: #a61f2d; background: #fff; }
.export-card strong { font-size: 16px; }
.export-card span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.backup-note { margin-top: 14px; }
@media (max-width: 1000px) {
    .workshop-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .export-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .workshop-stats, .workshop-filter, .export-grid { grid-template-columns: 1fr; }
}
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
.error-page { max-width: 760px; margin: 40px auto; }

/* Version 0.8 */
.settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-nav { position: sticky; top: 18px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.settings-nav a { display: block; padding: 9px 10px; border-radius: 4px; color: var(--text); text-decoration: none; }
.settings-nav a:hover { background: var(--surface-2); }
.settings-content { min-width: 0; }
.row-alert { background: #fff2f2; }
.inline-form { display: inline; margin-left: 5px; }
.button.danger { background: #fff; border-color: #cc9ea3; color: #8d2632; }
#recommendation-results small { display: block; margin-top: 4px; color: var(--muted); }
.panel-footer { padding-top: 12px; text-align: right; }
@media (max-width: 900px) { .settings-layout { grid-template-columns: 1fr; } .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; } }

/* Version 0.8 – Paketvollständigkeit */
.package-check-section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.package-check-section h3 { margin: 0 0 6px; }
.recommendation-item small { display: block; color: var(--muted); margin-top: 3px; }

/* Version 0.8.3 – kompakte Navigation und private Blockierungen */
.sidebar { overflow: hidden; }
.nav { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.nav-group { border-bottom: 1px solid #30353c; }
.nav-group summary { list-style: none; cursor: pointer; padding: 11px 12px; color: #9ea5ae; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; user-select: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: '+'; float: right; font-size: 15px; line-height: 10px; color: #858d97; }
.nav-group[open] summary::after { content: '−'; }
.nav-group-links { display: flex; flex-direction: column; gap: 2px; padding-bottom: 7px; }
.nav-group-links a { padding-top: 8px; padding-bottom: 8px; }
.private-order-table .price-column,
.private-order-table .discount-column { display: none; }
.settings-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-action-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-2); }
.settings-action-card p { margin: 0; }
@media (max-width: 760px) {
    .sidebar { overflow: visible; }
    .nav { overflow: visible; }
    .settings-action-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .nav { display: flex; flex-direction: column; }
}

/* Version 0.8.5 – klarere Navigation und PDF-Auswertungen */
@media (min-width: 761px) {
    .app-shell { grid-template-columns: 290px minmax(0, 1fr); }
    .sidebar {
        width: 290px;
        padding: 20px 14px 16px;
        overflow: hidden;
    }
    .content { grid-column: 2; padding-left: 36px; }
}
.brand { padding: 0 8px 18px; min-height: 62px; }
.brand > div { min-width: 0; }
.brand strong { font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.brand small { font-size: 12px; line-height: 1.35; }
.nav { gap: 6px; padding-right: 7px; }
.nav-group {
    display: block;
    width: 100%;
    border: 1px solid #343a42;
    border-radius: 5px;
    background: #24292f;
    overflow: hidden;
}
.nav-group summary {
    display: block;
    width: 100%;
    padding: 10px 12px;
    color: #c2c8d0;
    font-size: 12px;
    line-height: 1.3;
    background: #272d34;
}
.nav-group[open] summary { color: #ffffff; border-bottom: 1px solid #343a42; }
.nav-group-links {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 2px;
    width: 100%;
    padding: 6px;
}
.nav-group-links a {
    display: block !important;
    width: 100%;
    min-width: 0;
    padding: 9px 10px !important;
    font-size: 14px;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
}
.nav-group-links a.active { padding-left: 8px !important; }
.nav::-webkit-scrollbar { width: 8px; }
.nav::-webkit-scrollbar-thumb { background: #4a515a; border-radius: 8px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-footer { margin-top: 12px; padding-top: 12px; flex-shrink: 0; }

.settings-action-grid { grid-template-columns: minmax(0, 1fr); }
.settings-action-card { width: 100%; }
.settings-nav { padding: 12px; gap: 5px; }
.settings-nav a { border-left: 3px solid transparent; font-weight: 700; }
.settings-nav a:hover, .settings-nav a:focus { border-left-color: var(--accent); background: var(--surface-2); }

.report-filter-grid {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(200px, 1.2fr) minmax(150px, .8fr) minmax(150px, .8fr) minmax(170px, .9fr) auto;
    gap: 14px;
    align-items: end;
}
@media (max-width: 1250px) {
    .report-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .report-filter-grid { grid-template-columns: 1fr; }
    .nav-group { background: #24292f; }
}

/* Beta 1.0.1 – Basis */
.nav-tools { display: flex; justify-content: flex-end; align-items: center; padding: 0 7px 7px; flex-shrink: 0; }
.nav-focus-control { display: inline-flex; align-items: center; gap: 6px; color: #9ea5ae; font-size: 11px; cursor: help; user-select: none; }
.nav-focus-control input { width: 14px; height: 14px; margin: 0; }
.subsection-title { margin: 18px 0 8px; font-size: 13px; color: #4f5660; }
.compact-panel { padding-top: 16px; padding-bottom: 16px; }

.quick-command-trigger { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 50%; box-shadow: 0 4px 16px rgba(0,0,0,.15); font-size: 18px; }
.quick-command-dialog { width: min(620px, calc(100vw - 32px)); border: 0; border-radius: 8px; padding: 0; box-shadow: 0 18px 55px rgba(0,0,0,.28); }
.quick-command-dialog::backdrop { background: rgba(20,24,29,.28); }
.quick-command-body { padding: 20px; }
.quick-command-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; }
.quick-command-help { font-size: 12px; margin-top: 10px; }
@media (max-width: 760px) {
    .quick-command-trigger { right: 12px; bottom: 12px; }
    .nav-tools { justify-content: flex-start; padding-left: 12px; }
}

/* Beta 1.1 – kompaktere Bedienung und LTI-Bereich */
.help-label { cursor: help; }
.offer-description { min-width: 360px; min-height: 64px; resize: vertical; }
.offer-overbook-box { margin-top: 8px; padding: 8px 10px; border: 1px solid #e3b8bd; background: #fff7f8; border-radius: 4px; }
.offer-overbook-box[hidden] { display: none !important; }
.offer-overbook-box label { display: flex; gap: 7px; align-items: center; font-size: 12px; font-weight: 700; }
.offer-overbook-note { margin-top: 7px; }
.row-delete-button { border: 0; background: transparent; color: #8a929c; cursor: pointer; padding: 5px 7px; border-radius: 4px; font-size: 16px; }
.row-delete-button:hover { color: #9b2632; background: #f7e9eb; }
.offer-row.is-deleted { display: none; }
.offer-add-row { margin-top: 12px; }
.ownership-row { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(160px, .45fr); gap: 18px 22px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-2); }
.ownership-row[hidden] { display: none !important; }
.serial-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.serial-remove { min-width: 36px; }
.nav-lti-entry { margin-bottom: 4px; background: #193e32; border: 1px solid #285a49; color: #e9fff6 !important; text-align: center; letter-spacing: .05em; }
.nav-lti-entry:hover { background: #245442 !important; }
.nav-standalone { display: block; width: 100%; border-radius: 5px; border: 1px solid transparent; }
.lti-sidebar-actions { margin-top: auto; display: grid; gap: 6px; padding: 12px 8px 0; }
.sidebar-subtle-link { color: #b9c8c2; font-size: 12px; padding: 5px 2px; }
body.lti-mode {
    --accent: #1f6a4f;
    --accent-dark: #174f3b;
    --sidebar: #17352c;
    --surface-2: #f4f8f6;
}
body.lti-mode .sidebar { background: #17352c; }
body.lti-mode .brand-mark { background: #65b892; }
body.lti-mode .lti-brand strong { font-size: 20px; letter-spacing: .08em; }
body.lti-mode .nav a:hover { background: #21483b; }
body.lti-mode .nav a.active { background: #285444; border-left-color: #82c9a9; }
body.lti-mode .sidebar-footer { border-top-color: #315849; }
.lti-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.lti-kpi { background: white; border: 1px solid var(--border); border-radius: 6px; padding: 16px 18px; }
.lti-kpi span { color: var(--muted); display:block; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.lti-kpi strong { display:block; margin-top:7px; font-size:24px; }
.lti-overdue { color: #9b2632; }
.detail-grid > div { gap: 5px; }
.detail-grid > div > span { display: block; margin-bottom: 5px; }
.detail-grid > div > strong, .detail-grid > div > a { display: block; }
.compact-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.inline-form-grid { display:grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap:12px; align-items:end; }
.inline-form-grid .form-actions { margin:0; }
.package-component-summary { color: var(--muted); font-size: 12px; }
@media (max-width: 1000px) {
    .lti-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .inline-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .offer-description { min-width: 260px; }
}
@media (max-width: 760px) {
    .ownership-row, .inline-form-grid, .lti-kpi-grid { grid-template-columns: 1fr; }
}

/* Beta 1.2 – LTI dunkelblau, Bereichswechsel und Zubehör */
.nav-lti-entry {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin: 2px 0 8px;
    padding: 12px 13px !important;
    background: #123b68;
    border: 1px solid #285f98;
    color: #ffffff !important;
    text-align: left;
    letter-spacing: normal;
}
.nav-lti-entry strong { font-size: 15px; letter-spacing: .06em; }
.nav-lti-entry span { font-size: 11px; font-weight: 500; color: #c8def3; }
.nav-lti-entry:hover { background: #174a80 !important; }
.area-switch {
    display: block;
    margin: 0 7px 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 5px;
    color: #e5eef8;
    background: rgba(255,255,255,.07);
    font-weight: 700;
    text-align: center;
}
.area-switch:hover { color: #fff; background: rgba(255,255,255,.13); text-decoration: none; }
body.lti-mode {
    --accent: #174f86;
    --accent-dark: #103a64;
    --sidebar: #102b49;
    --surface-2: #f3f6fa;
}
body.lti-mode .sidebar { background: #102b49; }
body.lti-mode .brand-mark { background: #5e9bd3; }
body.lti-mode .nav a:hover { background: #183b60; }
body.lti-mode .nav a.active { background: #1d4b78; border-left-color: #79b2e5; }
body.lti-mode .sidebar-footer { border-top-color: #294d70; }
body.lti-mode .nav-standalone { color: #dbe9f7; }
body.lti-mode input:focus,
body.lti-mode select:focus,
body.lti-mode textarea:focus { outline-color: rgba(23,79,134,.16); border-color: #174f86; }
.lti-progress { width: 190px; margin-bottom: 5px; }
.lti-progress span { background: #174f86; }
.accessory-line {
    display: block;
    margin-top: 4px;
    padding-left: 12px;
    color: #78818c;
    font-size: 11px;
    font-weight: 400;
}
.lti-document-table td { vertical-align: top; }
.lti-document-table .lti-document-description { min-width: 360px; min-height: 64px; }
.lti-document-table input[type="number"] { min-width: 100px; }
.lti-document-table select { min-width: 115px; }
.lti-document-row.is-deleted { display: none; }
.hidden-delete { display: none; }
@media (max-width: 1000px) {
    .lti-document-table .lti-document-description { min-width: 260px; }
    .lti-progress { width: 145px; }
}

/* Beta 1.3 – drei Bereiche, gruppierte LTI-Navigation und WoMo */
.area-switcher {
    margin-top: auto;
    padding: 14px 7px 0;
    border-top: 1px solid rgba(255,255,255,.13);
    display: grid;
    gap: 7px;
    flex-shrink: 0;
}
.area-switcher > span {
    color: #929ba7;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 0 4px 2px;
}
.area-switcher .area-switch { margin: 0; }
.area-switch-lti { border-color: rgba(121,178,229,.48); }
.area-switch-womo { border-color: rgba(157,181,143,.48); }
.area-switch-home { font-size: 11px; font-weight: 600; opacity: .82; }
.sidebar-footer { margin-top: 10px; }

/* LTI konsequent dunkelblau */
body.lti-mode {
    --accent: #174f86;
    --accent-dark: #103a64;
    --sidebar: #102b49;
    --surface-2: #f3f6fa;
}
body.lti-mode .sidebar { background: #102b49; }
body.lti-mode .brand-mark { background: #79b2e5; }
body.lti-mode .nav-group { background: #123253; border-color: #294f73; }
body.lti-mode .nav-group summary { background: #14395e; color: #c8daeb; }
body.lti-mode .nav-group[open] summary { color: #fff; border-bottom-color: #294f73; }
body.lti-mode .nav-group summary::after { color: #8fb7da; }
body.lti-mode .nav-group-links a { color: #dbe9f7; }
body.lti-mode .nav-group-links a:hover { background: #183f67; }
body.lti-mode .nav-group-links a.active { background: #1d4b78; border-left-color: #79b2e5; color: #fff; }
body.lti-mode .nav-focus-control { color: #b9cee2; }
body.lti-mode .area-switcher { border-top-color: #294d70; }
body.lti-mode .lti-overdue { color: #174f86; }

/* WoMo – ruhiges Moosgrün */
body.womo-mode {
    --accent: #5f7456;
    --accent-dark: #4b5d44;
    --sidebar: #2d382a;
    --surface-2: #f4f7f2;
    --positive: #496743;
}
body.womo-mode .sidebar { background: #2d382a; }
body.womo-mode .brand-mark { background: #91aa82; }
body.womo-mode .womo-brand strong { font-size: 20px; letter-spacing: .04em; }
body.womo-mode .nav-group { background: #344130; border-color: #4d5c48; }
body.womo-mode .nav-group summary { background: #394735; color: #d4dfcf; }
body.womo-mode .nav-group[open] summary { color: #fff; border-bottom-color: #53634e; }
body.womo-mode .nav-group summary::after { color: #9fb294; }
body.womo-mode .nav-group-links a { color: #e3ebe0; }
body.womo-mode .nav-group-links a:hover { background: #455440; }
body.womo-mode .nav-group-links a.active { background: #506249; border-left-color: #9bb58c; color: #fff; }
body.womo-mode .nav-focus-control { color: #c1cfbc; }
body.womo-mode .area-switcher { border-top-color: #4b5946; }
body.womo-mode input:focus,
body.womo-mode select:focus,
body.womo-mode textarea:focus { outline-color: rgba(95,116,86,.16); border-color: #5f7456; }

/* Startseite/Bereichsauswahl */
.area-select-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background: #eef0f2;
}
.area-select-shell { width: min(1050px, 100%); }
.area-select-head { margin-bottom: 24px; text-align: center; }
.area-select-head h1 { font-size: 30px; }
.area-select-head p { margin-top: 8px; }
.area-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.area-card {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 26px;
    border-radius: 10px;
    border: 1px solid #d7dbe0;
    background: #fff;
    color: #1f252b;
    box-shadow: 0 8px 26px rgba(25,31,36,.06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.area-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(25,31,36,.11); text-decoration: none; }
.area-card strong { display:block; font-size: 26px; margin-bottom: 7px; }
.area-card span { color: #68717b; line-height: 1.5; }
.area-card .area-card-mark { width: 44px; height: 6px; border-radius: 4px; margin-bottom: 30px; }
.area-card-wws .area-card-mark { background: #a61f2d; }
.area-card-lti .area-card-mark { background: #174f86; }
.area-card-womo .area-card-mark { background: #5f7456; }
.area-card-disabled { opacity: .48; pointer-events: none; }
.area-select-footer { margin-top: 22px; display:flex; justify-content:center; gap:16px; color:#737b85; font-size:12px; }

/* WoMo Kalender */
.womo-calendar-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.womo-calendar-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.womo-month { background:#fff; border:1px solid var(--border); border-radius:8px; overflow:hidden; box-shadow:0 1px 2px rgba(0,0,0,.03); }
.womo-month h2 { padding:14px 16px; margin:0; background:#eef3eb; border-bottom:1px solid #dce5d7; color:#3c4c37; }
.womo-weekdays, .womo-week { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.womo-weekdays span { padding:8px 4px; text-align:center; font-size:10px; font-weight:700; text-transform:uppercase; color:#73806e; border-bottom:1px solid #e4e8e2; }
.womo-day { min-height:78px; padding:6px; border-right:1px solid #ecefeb; border-bottom:1px solid #ecefeb; background:#fff; position:relative; }
.womo-day:nth-child(7n) { border-right:0; }
.womo-day.outside { background:#fafbfa; color:#a7ada4; }
.womo-day.today { box-shadow: inset 0 0 0 2px #91aa82; }
.womo-day-number { font-size:11px; font-weight:700; color:#596354; }
.womo-day-bookings { display:grid; gap:3px; margin-top:5px; }
.womo-calendar-booking { display:block; padding:4px 5px; border-radius:4px; font-size:10px; line-height:1.2; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; background:#e6eee1; color:#3f5538; border-left:3px solid #6f865f; }
.womo-calendar-booking.external { background:#dbe7d5; border-left-color:#4e6944; font-weight:700; }
.womo-calendar-booking:hover { text-decoration:none; background:#d2e1cb; }
.womo-calendar-empty { padding:28px; text-align:center; color:var(--muted); }
.womo-booking-type-note { font-size:12px; color:var(--muted); margin-top:4px; }
.womo-material-row.is-deleted, .womo-invoice-row.is-deleted { display:none; }
.womo-document-description { min-width:340px; min-height:62px; }

/* Dezente Bewegungen: schnell und funktional */
.content { animation: contentIn .18s ease-out; }
.nav-group-links { transform-origin: top; }
.nav-group[open] .nav-group-links { animation: navOpen .16s ease-out; }
.button, .nav a, .area-switch, .panel, .womo-calendar-booking { transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease; }
.button:active { transform: translateY(1px); }
@keyframes contentIn { from { opacity:.45; transform:translateY(3px); } to { opacity:1; transform:none; } }
@keyframes navOpen { from { opacity:.3; transform:translateY(-3px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media (max-width: 1200px) {
    .womo-calendar-grid { grid-template-columns:1fr; }
}
@media (max-width: 850px) {
    .area-card-grid { grid-template-columns:1fr; }
    .area-card { min-height:150px; }
}

.area-select-footer .link-button { color:#59636d; }
.area-select-footer .link-button:hover { color:#1f252b; }
/* Bereichswechsel bleiben klar erkennbar, aber von der Arbeitsnavigation getrennt. */
.area-switch-lti { background: rgba(23,79,134,.28); }
.area-switch-lti:hover { background: rgba(23,79,134,.46); }
.area-switch-womo { background: rgba(95,116,86,.30); }
.area-switch-womo:hover { background: rgba(95,116,86,.48); }


/* Beta 1.3.2 – Bereichsauswahl & WoMo-Kalender */
.area-select-page { background: linear-gradient(180deg,#f6f7f8 0%,#eceff1 100%); }
.area-select-shell { width:min(1180px,100%); }
.area-select-head { margin-bottom:32px; }
.area-select-head h1 { margin:0; font-size:34px; letter-spacing:-.5px; color:#20262c; }
.area-select-head p { color:#68717b; font-size:14px; }
.area-card-grid { gap:22px; }
.area-card { min-height:250px; padding:30px; border-radius:14px; border:1px solid #dfe3e7; text-decoration:none !important; position:relative; }
.area-card::after { content:""; position:absolute; inset:0; border-radius:14px; pointer-events:none; box-shadow:inset 0 0 0 0 transparent; transition:box-shadow .16s ease; }
.area-card:hover::after { box-shadow:inset 0 0 0 2px rgba(0,0,0,.035); }
.area-card strong { font-size:28px; color:#20262c; }
.area-card > div > span { display:block; font-size:14px; max-width:280px; }
.area-card-button { align-self:flex-start; display:inline-flex !important; align-items:center; justify-content:center; min-width:112px; min-height:40px; padding:0 18px; border-radius:8px; color:#fff !important; font-weight:700; font-size:13px !important; letter-spacing:.1px; }
.area-card-wws .area-card-button { background:#a61f2d; }
.area-card-lti .area-card-button { background:#174f86; }
.area-card-womo .area-card-button { background:#5f7456; }
.area-card-button.disabled { background:#8b9299; }
.area-card-wws:hover { border-color:rgba(166,31,45,.35); }
.area-card-lti:hover { border-color:rgba(23,79,134,.35); }
.area-card-womo:hover { border-color:rgba(95,116,86,.42); }

.womo-calendar-toolbar { background:#fff; border:1px solid #dfe5dc; padding:10px 12px; border-radius:10px; margin-bottom:18px; }
.womo-calendar-status { display:flex; align-items:center; gap:10px; color:#687367; font-size:12px; }
.womo-calendar-status strong { color:#3f503a; font-size:16px; }
.womo-legend { display:inline-flex; align-items:center; gap:5px; padding-left:10px; border-left:1px solid #dde4da; }
.womo-legend i { width:10px; height:10px; border-radius:3px; display:inline-block; }
.womo-legend i.internal { background:#8ba37e; }
.womo-legend i.external { background:#4e6944; }
.womo-calendar-grid { align-items:start; }
.womo-month { border-radius:12px; border-color:#dce4d8; box-shadow:0 5px 18px rgba(50,66,45,.06); }
.womo-month h2 { font-size:16px; font-weight:800; padding:13px 14px; }
.womo-weekdays { background:#f7f9f6; }
.womo-weekdays span { padding:9px 2px; font-size:9px; letter-spacing:.35px; }
.womo-day { min-height:82px; padding:5px; }
.womo-day-number { width:24px; height:24px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; text-decoration:none !important; }
.womo-day-number:hover { background:#e5ece1; color:#33442f; }
.womo-day.today .womo-day-number { background:#5f7456; color:#fff; }
.womo-day.outside .womo-day-number { opacity:.42; }
.womo-calendar-booking { border-radius:5px; }
@media (max-width:1450px) { .womo-day { min-height:72px; } }
@media (max-width:1200px) { .womo-calendar-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:800px) { .womo-calendar-grid { grid-template-columns:1fr; } .womo-calendar-status { flex-wrap:wrap; justify-content:center; } }

/* ===== Beta 1.4 Bereichsstruktur ===== */
:root { --transition-area:#a61f2d; }
body.wws-mode { --accent:#a61f2d; --accent-dark:#7f1722; --sidebar:#351c20; }
body.wws-mode .sidebar { background:#351c20; }
body.wws-mode .brand-mark { background:#d24c59; }
body.wws-mode .nav-group { background:#412126; border-color:#65313a; }
body.wws-mode .nav-group summary { background:#4a252b; color:#ead7da; }
body.wws-mode .nav-group[open] summary { color:#fff; border-bottom-color:#65313a; }
body.wws-mode .nav-group summary::after { color:#d88a93; }
body.wws-mode .nav-group-links a { color:#f3e3e5; }
body.wws-mode .nav-group-links a:hover { background:#5a2b33; }
body.wws-mode .nav-group-links a.active { background:#6b3039; border-left-color:#e06a77; color:#fff; }
body.wws-mode .nav-focus-control { color:#e2c8cc; }
body.wws-mode .area-switcher { border-top-color:#65313a; }

body.admin-mode { --accent:#666d75; --accent-dark:#4e545b; --sidebar:#30343a; }
body.admin-mode .sidebar { background:#30343a; }
body.admin-mode .brand-mark { background:#aab0b6; }
body.admin-mode .nav-group { background:#393e45; border-color:#545b63; }
body.admin-mode .nav-group summary { background:#41474f; color:#e4e6e8; }
body.admin-mode .nav-group[open] summary { color:#fff; border-bottom-color:#5b626b; }
body.admin-mode .nav-group summary::after { color:#bcc1c6; }
body.admin-mode .nav-group-links a { color:#eef0f1; }
body.admin-mode .nav-group-links a:hover { background:#4b525b; }
body.admin-mode .nav-group-links a.active { background:#575f68; border-left-color:#c5c9cd; color:#fff; }
body.admin-mode .area-switcher { border-top-color:#555c64; }

.area-switch-wws { background:rgba(166,31,45,.30) !important; border-color:rgba(220,96,109,.50) !important; }
.area-switch-wws:hover { background:rgba(166,31,45,.52) !important; }
.area-switch-lti { background:rgba(23,79,134,.30) !important; border-color:rgba(121,178,229,.48) !important; }
.area-switch-womo { background:rgba(95,116,86,.32) !important; border-color:rgba(157,181,143,.48) !important; }
.area-switch-admin { background:rgba(112,120,129,.32) !important; border-color:rgba(186,192,198,.46) !important; }
.area-switch-admin:hover { background:rgba(112,120,129,.50) !important; }
.area-switch.current { box-shadow:inset 0 0 0 1px rgba(255,255,255,.42); font-weight:800; }

.area-card-admin .area-card-mark { background:#666d75; }
.area-card-admin .area-card-button { background:#666d75; }
.area-card-admin:hover { border-color:rgba(102,109,117,.40); }
.area-admin-row { display:flex; justify-content:center; margin-top:22px; }
.area-card-admin-compact { width:min(520px,100%); min-height:180px; }

.admin-home-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.admin-home-card { display:flex; flex-direction:column; gap:8px; padding:22px; min-height:130px; background:#fff; border:1px solid #dfe3e7; border-radius:10px; text-decoration:none !important; box-shadow:0 2px 9px rgba(0,0,0,.03); transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.admin-home-card strong { color:#2f3439; font-size:18px; }
.admin-home-card span { color:#6b737b; line-height:1.45; }
.admin-home-card:hover { transform:translateY(-2px); border-color:#b9bec4; box-shadow:0 8px 22px rgba(0,0,0,.07); }

.area-transition-layer { position:fixed; inset:0; pointer-events:none; z-index:9998; opacity:0; background:var(--transition-area); transition:opacity .20s ease; }
.area-transition-layer.show { opacity:.16; }
body.area-leaving .sidebar { transform:translateX(-104%); opacity:.2; }
body.area-leaving .content { transform:translateX(-12px); opacity:.28; }
.sidebar, .content { transition:transform .22s ease, opacity .22s ease; }

.area-expand-clone { position:fixed; z-index:9999; border-radius:14px; opacity:.98; pointer-events:none; transition:left .36s cubic-bezier(.2,.75,.25,1), top .36s cubic-bezier(.2,.75,.25,1), width .36s cubic-bezier(.2,.75,.25,1), height .36s cubic-bezier(.2,.75,.25,1), border-radius .28s ease, opacity .35s ease; }
.area-expand-clone.expand { left:0 !important; top:0 !important; width:100vw !important; height:100vh !important; border-radius:0; }

/* WoMo-Stammdaten */
body.womo-mode .button.primary { background:#5f7456; border-color:#5f7456; }
body.womo-mode .button.primary:hover { background:#506449; border-color:#506449; }
body.lti-mode .button.primary { background:#174f86; border-color:#174f86; }
body.admin-mode .button.primary { background:#666d75; border-color:#666d75; }
body.wws-mode .button.primary { background:#a61f2d; border-color:#a61f2d; }

@media (max-width:1000px) {
  .admin-home-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:700px) {
  .admin-home-grid { grid-template-columns:1fr; }
  .area-admin-row { margin-top:16px; }
}
/* Beta 1.5 */
.area-logo {width:48px;height:48px;object-fit:contain;border-radius:6px;}
.area-card-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
.area-card-rehearsal .area-card-mark,.area-card-rehearsal .area-card-button {background:#ad551f;}
.booking-bars {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px 0;padding:3px 0 7px;background:#fafbf9;min-height:10px;}
.booking-bar {display:block;margin:0 2px;padding:5px 7px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;border-radius:5px;color:#fff;background:#507749;text-decoration:none;}
.booking-bar.external {background:#235e87;}
.booking-bar.reserved {background:#e6ede3;color:#47613e;border:1px dashed #aec2a6;}
.booking-bar.external.reserved {background:#e6eef4;color:#305a79;border-color:#acc3d4;}
.room-calendar-booking {display:block;background:#f2d9c8;color:#68310e;border-radius:4px;padding:5px;font-size:12px;margin-top:4px;}
body.rehearsal-mode {--accent:#ad551f;--accent-dark:#81390e;}
@media(max-width:800px){.area-card-grid {grid-template-columns:1fr;}}

/* Beta 1.5.1 – kompakte Auswahl und ganze Tagesflächen */
.area-select-shell {max-width:1120px;}
.area-card-grid {grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
.area-card {min-height:172px;padding:18px;border-radius:10px;box-shadow:0 3px 12px rgba(25,31,36,.04);}
.area-card strong {font-size:21px;}
.area-card > div > span {font-size:12px;}
.area-card .area-card-mark {margin-bottom:16px;width:32px;height:4px;}
.area-card-button {min-width:80px;min-height:30px;padding:0 12px;font-size:12px !important;}
.area-card-admin-compact {width:min(320px,100%);min-height:130px;}
.area-switcher {grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;}
.area-switcher > span {grid-column:1 / -1;}
.area-switcher .area-switch {min-height:0;padding:6px 7px;font-size:11px;border-radius:5px;text-align:center;}
.area-switcher .area-switch-home {grid-column:1 / -1;}
.calendar-day-hit {position:absolute;inset:0;z-index:1;cursor:pointer;border-radius:2px;}
.calendar-day-hit:hover {background:rgba(110,120,130,.07);}
.calendar-day-hit:focus-visible {outline:2px solid var(--accent);outline-offset:-2px;}
.womo-day .womo-day-number {pointer-events:none;}
.room-calendar-booking {position:relative;z-index:2;font-size:10px;line-height:1.3;overflow-wrap:anywhere;}
.rehearsal-mode .womo-month h2 {background:#f5eee9;color:#714e37;}
@media(max-width:900px){.area-card-grid {grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:520px){.area-card-grid {grid-template-columns:1fr;}}

/* Beta 1.6 – durchgehende Buchungen innerhalb der Tagesfelder */
.womo-week-with-bars {position:relative;}
.womo-week-with-bars .womo-day {min-height:var(--week-height,80px);}
.womo-week-with-bars .in-day-bar {position:relative;z-index:2;align-self:start;height:22px;line-height:16px;padding:3px 5px;margin-left:0;margin-right:0;border-radius:0;}
.member-row {padding:12px 0;border-bottom:1px solid var(--border);}

/* Beta 1.7 */
.nav-group[data-current="true"] > summary {background:color-mix(in srgb,var(--area-color,var(--accent)) 55%,#263039);color:#fff;font-weight:800;}
body.rehearsal-mode .nav-group-links a.active {font-weight:800;background:rgba(255,255,255,.18);border-left:3px solid var(--accent);}
.area-switch.current {background:color-mix(in srgb,var(--area-color,var(--accent)) 70%,#263039) !important;color:white;box-shadow:inset 0 0 0 2px rgba(255,255,255,.55);}
tr.payment-paid > td {background:#edf7ee;}
tr.payment-open > td {background:#fff0ef;}
.billing-archive {border:2px solid #d8dfe5;background:#f8fafb;}
.checkbox-list label, #id_bookings label {display:flex;justify-content:space-between;gap:12px;padding:8px;border-bottom:1px solid #e5e7eb;}
.checkbox-list input, #id_bookings input {order:2;flex:0 0 auto;}
/* Beta 1.8 shared invoices */
.nav > a.nav-invoices, .nav > a.nav-data {display:block;margin:7px 0;padding:12px 14px;border:1px solid #606771;border-radius:8px;color:#fff;font-weight:700;background:rgba(255,255,255,.06);}
.nav > a.nav-invoices.active, .nav > a.nav-data.active {background:color-mix(in srgb,var(--accent) 52%,#41464e) !important;border-left:3px solid #fff;font-weight:800;}
tr.invoice-paid > td {background:#dff2e3 !important;}
tr.invoice-paid > td:first-child {box-shadow:inset 4px 0 #31844b;}
.invoice-preview {width:100%;height:780px;border:1px solid #d4d9df;background:white;}
#shared-invoice-form #id_bookings label {display:flex;justify-content:space-between;gap:12px;padding:8px;}
#shared-invoice-form #id_bookings input {order:2;}
.invoice-position-row input[type=number] {min-width:75px;}

#shared-invoice-form .invoice-position-row textarea {min-height:42px;height:42px;resize:vertical;}

/* Beta 1.9: data areas and business records */
.data-area-frame {border:2px solid #727982;border-radius:18px;padding:22px;margin-top:28px;background:#f0f2f4;}
.data-area-frame h2 {font-size:18px;margin:0 0 18px;color:#444b53;}
.data-area-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;}
.data-area-grid .area-card {border:2px solid #8a9199;min-height:190px;width:auto;max-width:none;}
.data-switch-group {grid-column:1/-1;display:grid;gap:8px;padding:12px;border:2px solid #aab1ba;border-radius:12px;margin-top:8px;}
.data-switch-group > span {color:#fff;font-weight:700;font-size:12px;}
.data-switch-group .area-switch {border:1px solid #aab1ba!important;}
.business-stats {display:grid;grid-template-columns:1fr 1fr;gap:18px;}
.business-record {display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 0;border-bottom:1px solid #ddd;}
.expense-paid td {background:#eef8ef;}.expense-open td {background:#fff1f1;}
.business-notes {max-width:300px;overflow-wrap:anywhere;}
@media(max-width:900px){.data-area-grid,.business-stats{grid-template-columns:1fr}.business-record{flex-direction:column;align-items:flex-start;}}

/* Compact data areas leave the four programs in the foreground. */
.program-area-frame {border:2px solid #89919b;border-radius:18px;padding:24px;background:#fff;}
.program-area-frame h2 {margin:0 0 20px;font-size:22px;color:#30363d;}
.data-area-frame {padding:15px 18px;margin-top:20px;}
.data-area-frame h2 {font-size:15px;margin-bottom:12px;}
.data-area-grid {gap:12px;}
.data-area-grid .area-card {min-height:130px;padding:15px;border-width:1px;border-radius:12px;}
.data-area-grid .area-card strong {font-size:17px;}
.data-area-grid .area-card span:not(.area-card-button) {font-size:12px;line-height:1.4;}
.data-area-grid .area-card .area-card-button {font-size:12px;padding:7px 10px;margin-top:12px;}
.data-area-grid .area-card .area-card-mark {height:4px;margin-bottom:12px;}
.data-area-grid .area-card .area-logo {max-height:28px;max-width:70px;}
.receipt-links,.receipt-selected {display:flex;flex-direction:column;gap:8px;margin:6px 0;}
.receipt-preview-dialog {width:min(1100px,94vw);max-width:94vw;height:88vh;max-height:88vh;padding:18px;border:1px solid #818a95;border-radius:12px;}
.receipt-preview-dialog::backdrop {background:rgba(0,0,0,.65);}
.receipt-preview-heading {display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px;}
#receipt-preview-title {overflow-wrap:anywhere;}
#receipt-preview-content {height:calc(100% - 55px);overflow:auto;display:flex;justify-content:center;align-items:flex-start;}
#receipt-preview-content iframe {width:100%;height:100%;border:0;}
#receipt-preview-content img {max-width:100%;height:auto;object-fit:contain;}
@media(max-width:700px){.program-area-frame{padding:16px;}.receipt-preview-dialog{padding:10px;}.receipt-preview-heading{align-items:flex-start;}}

.data-switch-group {grid-template-columns:repeat(2,minmax(0,1fr));padding:6px;gap:4px;border-width:1px;border-radius:8px;margin-top:6px;}
.data-switch-group > span {grid-column:1/-1;font-size:9px;opacity:.72;font-weight:600;}
.data-switch-group > a.data-switch-admin {grid-column:1/-1;}
.area-switcher .data-switch-group .area-switch {font-size:10px;line-height:1.25;padding:5px 6px;min-height:0;margin:0;border-radius:5px;font-weight:500;}
.area-switcher .data-switch-group .area-switch.current {font-weight:700;}

tr.invoice-overdue > td {background:#fbe8e8 !important;}
tr.invoice-neutral > td {background:transparent !important;}
tr.payment-reversed {opacity:.6;}

.invoice-color-legend {display:flex;flex-wrap:wrap;gap:12px;font-size:12px;color:#555;}
.invoice-color-legend span{padding:4px 8px;border-radius:5px;}
.legend-overdue{background:#fbe8e8;}
.legend-paid{background:#eaf6ec;}

/* Beta 2.0: scoped data archive */
.data-text {white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;}
.data-file {padding:18px 0;border-bottom:1px solid var(--border);overflow-wrap:anywhere;}
.data-file .header-actions {margin:12px 0;}
.data-file details {margin-top:12px;}
.data-preview-image {display:block;max-width:100%;max-height:600px;object-fit:contain;margin-top:12px;}
.data-preview-pdf {display:block;width:100%;height:600px;border:1px solid var(--border);margin-top:12px;}
