/* HayPlan Disponenten-Dashboard – modernes, sauberes Design */
:root {
    --nav-1: #081a42;
    --nav-2: #0d2d6c;
    --nav-3: #1651a8;
    --accent: #2563eb;
    --bg: #eef2f8;
    --card: #fff;
    --text: #14233d;
    --muted: #64748b;
    --line: #e2e8f1;
    --ok: #1f9d5b;
    --warn: #d33f3f;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(10, 30, 70, .05), 0 3px 10px rgba(10, 30, 70, .05);

    /* Teamfarben: klar unterscheidbar */
    --a: #2f6fe0; --a-bg: #dce9fd;
    --b: #25a062; --b-bg: #d8f2e5;
    --c: #ec9227; --c-bg: #fdebd0;
    --d: #8a5fe0; --d-bg: #e8dffb;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; cursor: pointer; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.small { width: 15px; height: 15px; }
.h-ic { color: var(--accent); }

/* Nichts bricht um: lange Texte werden mit … gekürzt */
.nav-item span, .kpi-tx small, .kpi-tx em, .tl-tx strong, .tl-tx small, .job span, .job small, .job b,
.quick-grid a, td, th, .card h2, .detail dd, .datenav span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
    width: 252px; flex: none; color: #fff; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background:
        radial-gradient(120% 60% at 0% 100%, rgba(60, 130, 255, .45) 0%, rgba(60, 130, 255, 0) 70%),
        linear-gradient(180deg, var(--nav-1) 0%, var(--nav-2) 55%, var(--nav-3) 100%);
    display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 72px; }
.brand-logo { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #3b82f6, #1d4ed8); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.brand-logo .ic { width: 24px; height: 24px; }
.brand-text strong { display: block; font-size: 22px; line-height: 1.05; }
.brand-text small { font-size: 12px; opacity: .8; white-space: nowrap; }
.nav { padding: 8px 12px 20px; display: flex; flex-direction: column; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 13px; padding: 11px 14px; border-radius: 10px; font-size: 15px; color: #d6e2f7; }
.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.is-active { background: linear-gradient(90deg, #2f6df0, #2a5fd8); color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(20, 70, 200, .45); }
.nav-sep { height: 1px; background: rgba(255,255,255,.14); margin: 12px 8px; }
.badge { margin-left: auto; background: #e5484d; color: #fff; font-size: 11px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 72px; background: linear-gradient(90deg, var(--nav-1), var(--nav-2)); color: #fff; display: flex; align-items: center; gap: 16px; padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.company { min-width: 0; }
.company h1 { font-size: 21px; line-height: 1.15; white-space: nowrap; }
.company p { font-size: 13px; opacity: .8; white-space: nowrap; }
.search { margin-left: auto; position: relative; width: min(100%, 390px); }
.search input { width: 100%; height: 42px; border-radius: 10px; border: 0; padding: 0 44px 0 16px; font-size: 14px; background: #fff; }
.search button { position: absolute; right: 3px; top: 3px; height: 36px; width: 40px; border: 0; background: none; color: #475569; }
.icon-btn { position: relative; background: none; border: 0; color: #fff; width: 42px; height: 42px; display: grid; place-items: center; }
.icon-btn .ic { width: 24px; height: 24px; }
.dot { position: absolute; top: 3px; right: 3px; background: #e5484d; color: #fff; font-size: 10px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; }
.user { display: flex; align-items: center; gap: 10px; font-size: 15px; white-space: nowrap; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #c9d4e6; color: #fff; display: grid; place-items: center; }
.avatar .ic { width: 24px; height: 24px; }
.menu-btn { display: none; background: none; border: 0; color: #fff; }

.content { padding: 14px 18px 22px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- Kennzahlen ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.kpi-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.kpi-ic .ic { width: 25px; height: 25px; }
.tone-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.tone-indigo { background: linear-gradient(135deg, #5b8def, #3b6fe0); }
.tone-green { background: linear-gradient(135deg, #2dbb6f, #1f9d5b); }
.tone-red { background: linear-gradient(135deg, #f0615f, #d33f3f); }
.tone-gray { background: linear-gradient(135deg, #8696ad, #66768d); }
.kpi-tx { min-width: 0; }
.kpi-tx small { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.kpi-tx strong { display: block; font-size: 26px; line-height: 1.1; }
.kpi-tx em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }

/* ---------- Grid ---------- */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; grid-template-areas: "cal detail" "orders quick"; align-items: stretch; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.card h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head .more { margin-left: auto; color: var(--accent); font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.cal { grid-area: cal; min-width: 0; }
.detail { grid-area: detail; padding: 0; overflow: hidden; }
.orders { grid-area: orders; min-width: 0; }
.quick { grid-area: quick; }

.tabs { display: flex; background: #eef2f8; border-radius: 9px; padding: 3px; margin-left: 10px; }
.tabs a { padding: 7px 16px; border-radius: 7px; font-weight: 600; font-size: 14px; color: var(--muted); }
.tabs a.on { background: var(--accent); color: #fff; }
.datenav { display: flex; align-items: center; gap: 2px; font-weight: 600; font-size: 14px; border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.datenav a { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 7px; color: var(--accent); }
.datenav a:hover { background: #eef2f8; }
.datenav span { padding: 0 8px; }
.btn-ghost { border: 1px solid var(--line); background: #fff; border-radius: 9px; height: 38px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; color: var(--accent); white-space: nowrap; }
.icon-sq { margin-left: auto; width: 38px; height: 38px; border: 1px solid var(--line); background: #fff; border-radius: 9px; display: grid; place-items: center; color: var(--muted); }

/* ---------- Wochenplan: Teams x Kalendertage, Aufträge als Balken ---------- */
.plan-scroll { overflow-x: auto; }
.wk { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.wk-7 { min-width: 860px; }
.wk-row { display: grid; grid-template-columns: 172px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.wk-row:last-child { border-bottom: 0; }
.wk-headrow { background: #f6f8fc; }
.tlabel { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-right: 1px solid var(--line); min-width: 0; }
.team-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.team-ic.team-a { background: var(--a); } .team-ic.team-b { background: var(--b); }
.team-ic.team-c { background: var(--c); } .team-ic.team-d { background: var(--d); }
.tl-tx { min-width: 0; }
.tl-tx strong { display: block; font-size: 15px; }
.tl-tx small { display: block; color: var(--muted); font-size: 12.5px; }
.wk-days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.dh { padding: 9px 4px; text-align: center; font-weight: 700; font-size: 13.5px; border-right: 1px solid var(--line); white-space: nowrap; }
.dh:last-child { border-right: 0; }
.dh.today { background: #dfeafd; color: var(--accent); }
.dh.weekend { color: var(--muted); }

.tdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 5px 0; padding: 6px 0; align-content: start; min-height: 92px;
    background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(100% / 7 - 1px), var(--line) calc(100% / 7 - 1px), var(--line) calc(100% / 7)); }
.wk-1 .tdays { grid-template-columns: 1fr; background-image: none; }
.wk-1 .gs-1 { grid-column-start: 1; } .wk-1 .ge-2 { grid-column-end: 2; }

.job { margin: 0 4px; border-radius: 8px; padding: 6px 9px; min-width: 0; border-left: 4px solid; display: flex; flex-direction: column; justify-content: center; gap: 1px; height: 62px; }
.job:hover { filter: brightness(.97); }
.job.is-sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.j-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.job b { font-size: 12.5px; font-weight: 700; }
.j-name { font-weight: 600; font-size: 13px; }
.job small { font-size: 12px; color: #4b5b73; }
.j-done { width: 15px; height: 15px; color: #fff; background: var(--ok); border-radius: 50%; padding: 2px; flex: none; }
.team-a { background: var(--a-bg); border-left-color: var(--a); }
.team-b { background: var(--b-bg); border-left-color: var(--b); }
.team-c { background: var(--c-bg); border-left-color: var(--c); }
.team-d { background: var(--d-bg); border-left-color: var(--d); }
.team-ic.team-a, .team-ic.team-b, .team-ic.team-c, .team-ic.team-d { border-left: 0; }
.team-ic.team-a { background: var(--a); } .team-ic.team-b { background: var(--b); }
.team-ic.team-c { background: var(--c); } .team-ic.team-d { background: var(--d); }

.gs-1 { grid-column-start: 1; } .gs-2 { grid-column-start: 2; } .gs-3 { grid-column-start: 3; } .gs-4 { grid-column-start: 4; }
.gs-5 { grid-column-start: 5; } .gs-6 { grid-column-start: 6; } .gs-7 { grid-column-start: 7; }
.ge-2 { grid-column-end: 2; } .ge-3 { grid-column-end: 3; } .ge-4 { grid-column-end: 4; } .ge-5 { grid-column-end: 5; }
.ge-6 { grid-column-end: 6; } .ge-7 { grid-column-end: 7; } .ge-8 { grid-column-end: 8; }

.chip { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; flex: none; }
.st-planned { background: #e3e8f0; color: #475569; }
.st-enroute { background: #d8f2e5; color: #17794a; }
.st-active { background: #dbe8ff; color: #1d4fb8; }
.st-done { background: #d8f2e5; color: #17794a; }
.job .chip { background: rgba(255,255,255,.75); }

/* ---------- Monatsansicht ---------- */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mh { background: #f6f8fc; padding: 8px; text-align: center; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--line); }
.mc { min-height: 72px; padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.mc:hover { background: #f4f8ff; }
.mc.out { color: #a9b3c1; background: #fafbfd; }
.mc.today { background: #e9f1ff; }
.mc span { font-weight: 700; font-size: 13px; }
.mc em { font-style: normal; font-size: 12px; background: #dbe8ff; color: #1d4fb8; border-radius: 6px; padding: 2px 6px; width: fit-content; }
.cal.is-full { position: fixed; inset: 0; z-index: 50; overflow: auto; border-radius: 0; }

/* ---------- Auftragsdetails ---------- */
.detail-head { background: linear-gradient(90deg, var(--nav-1), var(--nav-2)); color: #fff; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.detail-head h2 { font-size: 17px; }
.detail-head .chip { background: #3b82f6; color: #fff; }
.detail-body { padding: 14px 16px 16px; }
.detail-body h3 { font-size: 20px; margin-bottom: 8px; }
.detail dl, .detail-body dl { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 7px 8px; margin: 0 0 12px; font-size: 14px; }
.detail-body dt { display: flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; }
.detail-body dt .ic { color: #5c6f8a; }
.detail-body dd { margin: 0; font-weight: 500; }
.detail-body h4 { font-size: 14px; margin-bottom: 8px; }
.steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.steps::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 12px; height: 3px; background: #dfe5ee; }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.steps small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.dotn { width: 26px; height: 26px; border-radius: 50%; background: #dfe5ee; color: #475569; font-size: 12px; font-weight: 700; display: grid; place-items: center; z-index: 1; }
.steps .done .dotn, .steps .cur .dotn { background: var(--ok); color: #fff; }
.steps .cur small { color: var(--text); font-weight: 700; }
.btn-line, .btn-main { display: flex; align-items: center; gap: 10px; height: 42px; border-radius: 9px; padding: 0 14px; font-weight: 600; font-size: 14px; margin-top: 8px; }
.btn-line { background: #eef3fb; color: #1d4fb8; }
.btn-line:hover { background: #e3ecf9; }
.btn-main { background: var(--accent); color: #fff; justify-content: center; }
.btn-main:hover { background: #1d54cf; }

/* ---------- Tabelle ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 13px; font-weight: 700; padding: 8px 10px; background: #f6f8fc; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); max-width: 170px; }
tbody tr:last-child td { border-bottom: 0; }
th.r, td.r { text-align: right; overflow: visible; }
td.r a { color: var(--muted); margin-left: 12px; }
td.r a:hover { color: var(--accent); }
.nr { font-weight: 700; }
.tdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; border: 0; }
.tdot.team-a { background: var(--a); } .tdot.team-b { background: var(--b); } .tdot.team-c { background: var(--c); } .tdot.team-d { background: var(--d); }

/* ---------- Schnellzugriffe ---------- */
.quick h2 { margin-bottom: 12px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-grid a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); border-radius: 10px; padding: 10px 2px; background: #fafbfd; }
.quick-grid a:hover { border-color: var(--accent); background: #f2f7ff; }
.q-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: #e4edff; }
.quick-grid a:first-child .q-ic { background: var(--accent); color: #fff; }

/* ---------- Fehlerseite & Buttons ---------- */
.error-page { display: grid; place-items: center; min-height: 100vh; }
.error-box { background: #fff; padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; max-width: 520px; }
.error-box h1 { font-size: 56px; color: var(--nav-2); }
.error-box pre { text-align: left; overflow: auto; font-size: 12px; }
.btn { display: inline-block; margin-top: 18px; background: var(--accent); color: #fff; padding: 10px 20px; border-radius: 9px; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1400px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1200px) {
    .grid { grid-template-columns: 1fr; grid-template-areas: "cal" "detail" "orders" "quick"; }
}
@media (max-width: 900px) {
    .sidebar { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
    .sidebar.open { transform: none; }
    .menu-btn { display: block; }
    .search { display: none; }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .user-name, .company p { display: none; }
    .content { padding: 10px; }
    .card-head { flex-wrap: wrap; }
}

/* Schnellzugriffe: 2x2, Icon links neben Text (kein Abschneiden) */
.quick-grid { grid-template-columns: 1fr 1fr; }
.quick-grid a { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 8px 10px; text-align: left; font-size: 13.5px; }
.q-ic { width: 34px; height: 34px; flex: none; }

/* =====================================================================
   Erweiterung: Benachrichtigungen, Schnellzugriffe, Monat, Tag-Board
   ===================================================================== */
.grid { grid-template-areas: "cal detail" "orders notes" "quick quick"; }
.notes { grid-area: notes; min-width: 0; }
.quick { grid-area: quick; padding: 0; background: none; box-shadow: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

/* Benachrichtigungsliste (Karte + Glocken-Menü) */
.nlist { list-style: none; margin: 0; padding: 0; }
.nlist li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.nlist li:first-child { border-top: 0; }
.n-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.n-ic .ic { width: 18px; height: 18px; }
.nt-done { background: #d8f2e5; color: #17794a; } .nt-absence { background: #dbe8ff; color: #1d4fb8; }
.nt-material { background: #fdebd0; color: #b26a12; } .nt-change { background: #e8dffb; color: #6a43c2; }
.nt-conflict { background: #fde0e0; color: #c03030; }
.n-tx { flex: 1; min-width: 0; }
.n-tx strong { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-tx small { display: block; font-size: 12px; color: var(--muted); }
.nlist li.unread .n-tx strong { font-weight: 700; }
.n-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }

.notif-wrap { position: relative; }
.notif-panel { position: absolute; right: -40px; top: 52px; width: 380px; max-width: calc(100vw - 24px); background: #fff; color: var(--text); border-radius: 12px; box-shadow: 0 12px 40px rgba(8, 26, 66, .28); padding: 6px 16px 10px; z-index: 60; }
.notif-panel[hidden] { display: none; }
.notif-panel header { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 8px; font-size: 15px; }
.notif-panel header a { font-size: 13px; color: var(--accent); font-weight: 600; }

/* Schnellzugriffe: moderne Aktionskacheln */
.qtile { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; border: 1px solid transparent; min-width: 0; transition: transform .12s, box-shadow .12s; }
.qtile:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(10, 30, 70, .12); border-color: #c9dafc; }
.qtile .q-ic { width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(135deg, #e6efff, #d3e2ff); color: var(--accent); display: grid; place-items: center; flex: none; }
.qtile .q-ic .ic { width: 24px; height: 24px; }
.q-tx { flex: 1; min-width: 0; }
.q-tx strong, .q-tx small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-tx strong { font-size: 15.5px; }
.q-tx small { font-size: 12.5px; color: var(--muted); }
.q-arrow { color: #a3b1c6; }
.qtile.primary { background: linear-gradient(135deg, #2f6df0, #1e4fc4); color: #fff; }
.qtile.primary .q-ic { background: rgba(255,255,255,.2); color: #fff; }
.qtile.primary .q-tx small, .qtile.primary .q-arrow { color: rgba(255,255,255,.8); }

/* Teamlegende */
.legend { display: flex; align-items: center; gap: 16px; margin: -2px 0 10px; font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .tdot { width: 11px; height: 11px; border-radius: 3px; margin: 0; }
.legend-note { margin-left: auto; color: var(--muted); font-weight: 500; }

/* Monat: Karten-Raster mit Auftragschips je Team */
.month { gap: 0; background: #fff; }
.mh { background: linear-gradient(180deg, #f6f8fc, #eef2f9); font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 8px; }
.mc { min-height: 112px; padding: 6px 6px 8px; gap: 3px; background: #fff; overflow: hidden; }
.mc.out { background: #f7f9fc; } .mc.out .mc-day { color: #b2bccb; }
.mc.today { background: #f1f6ff; box-shadow: inset 0 0 0 2px var(--accent); }
.mc-top { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 2px; }
.mc .mc-day { font-size: 13.5px; font-weight: 700; }
.mc.today .mc-day { background: var(--accent); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; }
.mc-top small { font-size: 11px; font-weight: 700; color: var(--muted); background: #eef2f9; border-radius: 999px; padding: 1px 7px; }
.mj { display: block; font-style: normal; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 5px; border-left-width: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc .mj-more { background: none; color: var(--muted); font-size: 11.5px; padding: 0 2px; width: auto; font-style: normal; }

/* Tag: Team-Board (je Team eine Spalte, Aufträge als Karten in Reihenfolge) */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tcol { background: #f6f8fc; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; min-width: 0; }
.tcol > header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.tc-tx { flex: 1; min-width: 0; }
.tc-tx strong, .tc-tx small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-tx small { font-size: 12px; color: var(--muted); }
.cnt { background: #eef2f9; border-radius: 999px; min-width: 26px; height: 26px; display: grid; place-items: center; font-size: 13px; }
.tcol-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 260px; }
.tcard { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 9px; min-width: 0; }
.tcard:hover { filter: brightness(.97); }
.tcard.is-sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.tcard strong, .tcard small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tcard strong { font-size: 14.5px; margin-top: 4px; }
.tcard small { font-size: 12.5px; color: #4b5b73; }
.tc-top { display: flex; align-items: center; justify-content: space-between; }
.seq { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.85); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.tcard .chip { background: rgba(255,255,255,.8); }
.empty { border: 1px dashed #c7d1e0; border-radius: 9px; padding: 18px 10px; text-align: center; color: var(--muted); font-size: 13px; margin: 0; }

@media (max-width: 1200px) { .grid { grid-template-areas: "cal" "detail" "orders" "notes" "quick"; } .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .quick { grid-template-columns: 1fr; } .board { grid-template-columns: 1fr; } }

/* Kalender passt auch auf kleineren Laptop-Bildschirmen ohne Scrollleiste */
.wk-7 { min-width: 740px; }
@media (max-width: 1700px) {
    .wk-row { grid-template-columns: 150px minmax(0, 1fr); }
    .grid { grid-template-columns: minmax(0, 1fr) 310px; }
}

/* ---------- Anmeldung & Ersteinrichtung ---------- */
.logout-form { margin: 0; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 20px;
    background: radial-gradient(120% 70% at 0% 100%, rgba(60, 130, 255, .45), rgba(60, 130, 255, 0) 70%), linear-gradient(160deg, var(--nav-1), var(--nav-2) 60%, var(--nav-3)); }
.auth-card { width: min(100%, 420px); background: #fff; border-radius: 16px; padding: 28px 28px 30px; box-shadow: 0 20px 60px rgba(4, 16, 48, .4); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--nav-2); }
.auth-brand .brand-text strong { font-size: 22px; }
.auth-brand .brand-text small { opacity: .7; }
.auth-card h1 { font-size: 24px; margin-bottom: 4px; }
.auth-sub { color: var(--muted); margin-bottom: 16px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.auth-form input { height: 46px; border: 1px solid #cdd6e4; border-radius: 10px; padding: 0 14px; font-size: 16px; }
.auth-form input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.auth-form .btn-main { border: 0; height: 48px; cursor: pointer; font-size: 16px; margin-top: 4px; }
.auth-error { background: #fde8e8; color: #a52a2a; border-radius: 10px; padding: 11px 14px; margin-bottom: 14px; font-size: 14px; }
.auth-note { background: #eef3fb; border-radius: 10px; padding: 14px; font-size: 14px; line-height: 1.5; }
.auth-note pre { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow-x: auto; font-size: 12.5px; margin: 8px 0; }
.auth-note code { background: #fff; padding: 1px 5px; border-radius: 4px; }
.auth-h2 { font-size: 15px; margin: 6px 0 -4px; color: var(--nav-2); border-top: 1px solid var(--line); padding-top: 14px; }
.auth-form > .auth-h2:first-child { border-top: 0; padding-top: 0; }

/* Passwort-Auge */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 50px; }
.pw-toggle { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border: 0; background: none; color: var(--muted); border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.pw-toggle:hover { background: #eef2f8; color: var(--accent); }
.pw-toggle svg { width: 22px; height: 22px; }

/* ---------- Verwaltungsseiten (Benutzer, Konto, Protokoll) ---------- */
.page-head h1 { font-size: 22px; }
.page-head p { color: var(--muted); margin-top: 2px; }
.content > .card { min-width: 0; }
.card.narrow { max-width: 480px; }
.muted { color: var(--muted); }
.flash { border-radius: 10px; padding: 12px 16px; font-size: 14.5px; }
.flash-ok { background: #d8f2e5; color: #17794a; }
.flash-err { background: #fde8e8; color: #a52a2a; }
.flash-info { background: #dbe8ff; color: #1d4fb8; }
.temp-card { border: 2px solid #f0b429; background: #fffaf0; }
.temp-card h2 { margin-bottom: 6px; }
.temp-dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 10px; margin: 12px 0; font-size: 15px; }
.temp-dl dd { margin: 0; }
.temp-pw { font-size: 20px; letter-spacing: 1px; background: #fff; border: 1px solid #e5c97a; border-radius: 8px; padding: 6px 12px; user-select: all; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.tag-ok { background: #d8f2e5; color: #17794a; } .tag-off { background: #e3e8f0; color: #475569; }
.tag-warn { background: #fde0e0; color: #c03030; } .tag-info { background: #dbe8ff; color: #1d4fb8; }
td.acts { white-space: nowrap; }
form.inline { display: inline-block; margin: 0 0 0 6px; }
.btn-sm { border: 1px solid var(--line); background: #fff; border-radius: 8px; height: 34px; padding: 0 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); }
.btn-sm:hover { background: #f2f6fc; border-color: #c9d6ea; }
.btn-sm.btn-danger { color: #b3302e; }
.btn-sm.btn-danger:hover { background: #fde8e8; border-color: #f0b8b6; }
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.stack-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.stack-form input { height: 44px; border: 1px solid #cdd6e4; border-radius: 10px; padding: 0 14px; font-size: 15px; }
.stack-form input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.stack-form .btn-main { border: 0; cursor: pointer; font-size: 15px; }
.row-form { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
.row-form label { flex: 1 1 240px; }
.row-form .btn-main { height: 44px; padding: 0 22px; margin: 0; }
.form-hint { color: var(--muted); font-size: 13px; margin-top: 10px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; padding-top: 14px; font-size: 14px; }
.pager a { color: var(--accent); font-weight: 600; }

.auth-link { color: var(--accent); font-size: 14px; font-weight: 600; text-align: center; display: block; padding-top: 4px; }
.auth-link:hover { text-decoration: underline; }
.auth-steps { margin: 0 0 10px; padding-left: 20px; }
.auth-steps li { margin-bottom: 8px; }
.auth-foot { margin-top: 16px; }
.uname { color: var(--muted); font-size: 12.5px; display: block; }
.auth-inline { color: var(--accent); font-weight: 600; text-decoration: underline; }
.auth-btn { display: flex; align-items: center; justify-content: center; margin-top: 8px; }

/* Notfallzugang: Neuinstallation */
.reset-h { margin-top: 22px; }
.auth-form label.check-row { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
.auth-form label.check-row input { width: 20px; height: 20px; flex: none; }
.btn-danger-solid { border: 0; height: 48px; border-radius: 10px; background: #c0392b; color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; }
.btn-danger-solid:hover { background: #a93226; }

.auth-ok { background: #d8f2e5; color: #17794a; border-radius: 10px; padding: 11px 14px; margin-bottom: 14px; font-size: 14.5px; line-height: 1.45; }
.form-hint-top { margin: 0 0 12px; }

/* ---------- Kunden & Standorte ---------- */
.head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.head-actions form.inline { margin: 0; }
.btn-inline { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; width: auto; margin: 0; text-decoration: none; }
.btn-right { margin-left: auto; height: 38px; }
.btn-link { display: inline-flex; align-items: center; text-decoration: none; }
a.btn-sm { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type="search"] { flex: 1 1 280px; height: 40px; border: 1px solid #cdd6e4; border-radius: 10px; padding: 0 14px; font-size: 14.5px; }
.toolbar input[type="search"]:focus { outline: 2px solid var(--accent); border-color: transparent; }
.check-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.row-off td { color: var(--muted); }
.empty-cell { text-align: center; color: var(--muted); padding: 28px 10px; white-space: normal; max-width: none; }
.info-grid { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 14.5px; }
.info-grid dt { color: var(--muted); }
.info-grid dd { margin: 0; }
.info-grid dd.pre { white-space: pre-wrap; }
.form-card { max-width: 760px; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-form .span-2 { grid-column: 1 / -1; }
.grid-form textarea, .stack-form textarea { border: 1px solid #cdd6e4; border-radius: 10px; padding: 10px 14px; font: inherit; font-size: 15px; resize: vertical; }
.grid-form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.field-hint { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.form-actions { display: flex; align-items: center; gap: 12px; }
.err-list { margin: 0; padding-left: 18px; }
td a.uname { display: block; text-decoration: none; color: var(--accent); }
@media (max-width: 700px) { .grid-form { grid-template-columns: 1fr; } .info-grid { grid-template-columns: 1fr; } }

/* Kundenformular in Abschnitten */
.stack-form > .form-card { max-width: 860px; }
.info-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; }
.info-notes { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.check-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; max-width: 860px; display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; cursor: pointer; }
.stack-form label.check-card { flex-direction: row; font-weight: 500; }
.stack-form label.check-card input { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.field-hint.block { display: block; margin: 2px 0 0; }
@media (max-width: 900px) { .info-cols { grid-template-columns: 1fr; } }

/* ---------- Formular mit Live-Kundenkarte und Karte ---------- */
[hidden] { display: none !important; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
.form-layout > .stack-form, .form-layout > .form-card { min-width: 0; }
.form-layout .stack-form > .form-card, .form-layout .check-card { max-width: none; }
.form-aside { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 14px; }

.live-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #17794a; background: #d8f2e5; border-radius: 999px; padding: 3px 10px; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: #22a559; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.lc-top { display: flex; align-items: center; gap: 14px; padding: 4px 0 14px; border-bottom: 1px solid var(--line); }
.lc-avatar { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; font-size: 20px; font-weight: 700; display: grid; place-items: center; flex: none; letter-spacing: .5px; }
.lc-avatar.lc-pin { background: linear-gradient(135deg, #2dbb6f, #1f9d5b); }
.lc-title { min-width: 0; }
.lc-title strong { display: block; font-size: 17px; overflow-wrap: anywhere; }
.lc-title small { display: block; color: var(--muted); font-size: 13px; }
.is-empty { color: #a3afc0 !important; font-weight: 500 !important; }

.lc-list { margin: 12px 0 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.lc-list > div { display: flex; gap: 12px; align-items: flex-start; }
.lc-list dt { width: 26px; height: 26px; border-radius: 8px; background: #eaf1ff; color: var(--accent); display: grid; place-items: center; flex: none; }
.lc-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; padding-top: 3px; }
.lc-list dd span { display: block; }

.lc-invoice { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.lc-invoice h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin: 0 0 8px; }
.lc-kv { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.lc-kv > div { display: flex; justify-content: space-between; gap: 12px; }
.lc-kv dt { color: var(--muted); }
.lc-kv dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.lc-note { margin: 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

.lc-progress { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.lc-progress-text { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.lc-progress-text b { color: var(--text); }
.lc-progress progress { width: 100%; height: 8px; border: 0; border-radius: 999px; overflow: hidden; background: #e6ecf5; appearance: none; -webkit-appearance: none; }
.lc-progress progress::-webkit-progress-bar { background: #e6ecf5; }
.lc-progress progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; transition: width .2s; }
.lc-progress progress::-moz-progress-bar { background: var(--accent); }
.is-complete .lc-progress progress::-webkit-progress-value { background: #22a559; }
.is-complete .lc-progress progress::-moz-progress-bar { background: #22a559; }

.map-box { height: 250px; border-radius: 10px; overflow: hidden; background: #eaf0f8; border: 1px solid var(--line); }
.map-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px; text-align: center; color: var(--muted); font-size: 14px; }
.map-empty .ic { width: 34px; height: 34px; color: #93a6c4; }
.map-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.map-link { color: var(--accent); font-weight: 600; font-size: 13.5px; }
.map-hint { margin-top: 8px; }

@media (max-width: 1280px) { .form-layout { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (max-width: 1000px) { .form-layout { grid-template-columns: 1fr; } .form-aside { position: static; } }

/* ---------- Monteure und Teams ---------- */
/* Teamfarben (acht Stück): Hauptfarbe --tc, heller Hintergrund --tc-bg */
.c-blue,   [data-color="blue"]   { --tc: #2f6fe0; --tc-bg: #dce9fd; }
.c-green,  [data-color="green"]  { --tc: #25a062; --tc-bg: #d8f2e5; }
.c-orange, [data-color="orange"] { --tc: #ec9227; --tc-bg: #fdebd0; }
.c-purple, [data-color="purple"] { --tc: #8a5fe0; --tc-bg: #e8dffb; }
.c-red,    [data-color="red"]    { --tc: #d94a4a; --tc-bg: #fbdede; }
.c-teal,   [data-color="teal"]   { --tc: #1c9fb0; --tc-bg: #d3eff3; }
.c-pink,   [data-color="pink"]   { --tc: #d6479b; --tc-bg: #f9dcee; }
.c-gray,   [data-color="gray"]   { --tc: #6b7a90; --tc-bg: #e3e8f0; }

.tteam { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.tteam i { width: 10px; height: 10px; border-radius: 3px; background: var(--tc, #aab4c2); }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.team-card { border-top: 5px solid var(--tc); display: flex; flex-direction: column; gap: 12px; }
.team-card.is-off { opacity: .6; }
.tc-head { display: flex; align-items: center; gap: 12px; }
.tc-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--tc); color: #fff; display: grid; place-items: center; flex: none; }
.tc-icon .ic { width: 24px; height: 24px; }
.tc-name { min-width: 0; }
.tc-name h2 { font-size: 18px; margin: 0; overflow-wrap: anywhere; }
.tc-name small { color: var(--muted); font-size: 13px; }
.live-card [data-color] .tc-icon, .form-aside[data-color] .tc-icon { background: var(--tc); }
.form-aside[data-color] .team-card-live { border-top: 5px solid var(--tc); }
.member-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.member-list li { display: flex; align-items: center; gap: 10px; }
.member-list li a:hover { text-decoration: underline; }
.m-av { width: 28px; height: 28px; border-radius: 50%; background: var(--tc-bg, #e3e8f0); color: var(--tc, #475569); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; flex: none; }
.lead-tag { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--tc, #475569); background: var(--tc-bg, #e3e8f0); border-radius: 999px; padding: 2px 9px; }
.tc-notes { margin: 0; font-size: 13.5px; color: var(--muted); }
.tc-foot { margin-top: auto; display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.tc-foot form.inline { margin: 0; }
.empty-card { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); }
.empty-card .ic { width: 42px; height: 42px; color: #93a6c4; }

.field-block { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 14px; font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-weight: 500; font-size: 12.5px; }
.swatch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.swatch span { width: 44px; height: 44px; border-radius: 12px; background: var(--tc); color: #fff; display: grid; place-items: center; border: 3px solid transparent; transition: transform .1s; }
.swatch span .ic { opacity: 0; }
.swatch input:checked + span { border-color: #fff; box-shadow: 0 0 0 3px var(--tc); }
.swatch input:checked + span .ic { opacity: 1; }
.swatch input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 3px; }
.swatch em { font-style: normal; color: var(--muted); }

.qual-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.stack-form label.qual-chip { flex-direction: row; align-items: center; gap: 8px; border: 1px solid #cdd6e4; border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 500; font-size: 14px; background: #fff; }
.qual-chip input { width: 18px; height: 18px; margin: 0; flex: none; }
.stack-form label.qual-chip:has(input:checked) { background: #e4edff; border-color: var(--accent); color: #1d4fb8; }
.stack-form .qual-chip input { height: 18px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-q { display: inline-block; background: #e4edff; color: #1d4fb8; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; margin: 0 6px 6px 0; }
.info-grid dd .chip-q { margin: 0 6px 4px 0; }
.lc-avatar.lc-person { background: linear-gradient(135deg, #8a5fe0, #5b3bb5); }

.stack-form select { height: 44px; border: 1px solid #cdd6e4; border-radius: 10px; padding: 0 12px; font-size: 15px; background: #fff; }
.stack-form select:focus { outline: 2px solid var(--accent); border-color: transparent; }

.pick-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pick-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--line); }
.pick-list li:first-child { border-top: 0; }
.pick-list li:hover { background: #f6f9fd; }
.stack-form label.pick-main { flex-direction: row; align-items: center; gap: 12px; font-weight: 500; flex: 1; cursor: pointer; min-width: 0; }
.stack-form label.pick-lead { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; color: var(--muted); cursor: pointer; }
.pick-main input, .pick-lead input { width: 18px; height: 18px; flex: none; margin: 0; }
.stack-form .pick-main input, .stack-form .pick-lead input { height: 18px; }
.pick-main .m-av { background: #e4edff; color: #1d4fb8; }

/* ---------- Fahrzeuge ---------- */
.plate { display: inline-flex; align-items: stretch; background: #fff; border: 2px solid #1b2433; border-radius: 7px; overflow: hidden; text-decoration: none; color: #1b2433; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.plate-eu { background: #1d4aa8; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: flex-end; justify-content: center; padding: 0 5px 3px; min-width: 22px; }
.plate strong { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: 1.5px; padding: 3px 10px; font-size: 15px; white-space: nowrap; }
.plate-sm strong { font-size: 13px; padding: 2px 8px; }
.plate-lg strong { font-size: 24px; padding: 6px 16px; letter-spacing: 2px; }
.plate-lg .plate-eu { font-size: 13px; min-width: 28px; padding-bottom: 5px; }
.plate-lg { border-radius: 9px; }
.lc-vehicle { margin: 14px 0 6px; }
.lc-kv-top { margin-top: 6px; }
.show-sub { margin-top: 8px; color: var(--muted); }
.input-plate { text-transform: uppercase; font-family: ui-monospace, Consolas, monospace; letter-spacing: 1px; }

.due { display: inline-block; border-radius: 6px; padding: 2px 9px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.due-ok { background: #d8f2e5; color: #17794a; }
.due-soon { background: #fdebd0; color: #a8610c; }
.due-overdue { background: #fbdede; color: #b3302e; }
.legend-due { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; font-size: 12.5px; }
.due-text[data-state="ok"] { color: #17794a; }
.due-text[data-state="soon"] { color: #a8610c; }
.due-text[data-state="overdue"] { color: #b3302e; }
.due-text { font-weight: 600; }
.tc-vehicles { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; padding-top: 4px; }

.map-box { position: relative; }
.map-note { position: absolute; left: 8px; right: 8px; bottom: 8px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; color: #a8610c; font-weight: 600; }

/* ---------- Aufträge ---------- */
.chip.st-cancelled, i.st-cancelled { background: #e9ecf1; color: #6b7686; text-decoration: line-through; }
.prio { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 700; margin-left: 6px; vertical-align: middle; }
.prio-hoch { background: #fdebd0; color: #a8610c; }
.prio-dringend { background: #fbdede; color: #b3302e; }
.page-head h1 .chip { font-size: 13px; vertical-align: middle; margin-left: 8px; }
.toolbar-filters select { height: 40px; border: 1px solid #cdd6e4; border-radius: 10px; padding: 0 10px; font-size: 14px; background: #fff; }
.lc-avatar.lc-order { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.lc-avatar.lc-order .ic { width: 26px; height: 26px; }
.lc-list dd b { font-weight: 700; }
.lc-list dd span:empty { display: none; }

.status-form { display: flex; flex-direction: column; gap: 12px; }
.status-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.step-btn { border: 2px solid transparent; border-radius: 10px; padding: 9px 16px; font-weight: 600; font-size: 14px; cursor: pointer; }
.step-btn:hover:not(:disabled) { filter: brightness(.95); }
.step-btn.is-cur { border-color: currentColor; cursor: default; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.step-btn:disabled { opacity: 1; }
.status-form input[name="note"] { height: 40px; border: 1px solid #cdd6e4; border-radius: 10px; padding: 0 12px; font-size: 14px; max-width: 520px; }
.info-cols-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .info-cols-cards { grid-template-columns: 1fr; } }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; grid-template-columns: 150px auto 1fr; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.history li:first-child { border-top: 0; }
.history time { color: var(--muted); font-size: 13px; }
.history small { color: var(--muted); }
@media (max-width: 700px) { .history li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Kalender mit echten Teamfarben, Abwesenheiten und Konflikten ---------- */
.team-ic[class*="c-"] { background: var(--tc); }
.tdot[class*="c-"] { background: var(--tc); }
.job[class*="c-"], .tcard[class*="c-"], .mj[class*="c-"] { background: var(--tc-bg); border-left-color: var(--tc); }
.job.c-gray, .tcard.c-gray { border: 1px solid var(--line); border-left: 4px solid var(--tc); }
.job[class*="c-"] { border-top: 0; border-right: 0; border-bottom: 0; }
.wk-unassigned { background: repeating-linear-gradient(135deg, #fafbfd, #fafbfd 8px, #f3f5f9 8px, #f3f5f9 16px); }
.wk-unassigned .team-ic { background: #8e9bb0; }

.abs-chip { margin: 0 4px; border-radius: 6px; padding: 3px 8px; font-size: 12px; font-weight: 600; color: #5b6778; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    background: repeating-linear-gradient(135deg, #e7ebf2, #e7ebf2 6px, #f2f4f8 6px, #f2f4f8 12px); border: 1px dashed #b9c3d3; }
.abs-card { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #5b6778; border: 1px dashed #b9c3d3;
    background: repeating-linear-gradient(135deg, #e7ebf2, #e7ebf2 6px, #f2f4f8 6px, #f2f4f8 12px); }
.abs-sw, .warn-sw { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.abs-sw { border: 1px dashed #b9c3d3; background: repeating-linear-gradient(135deg, #e7ebf2, #e7ebf2 3px, #f2f4f8 3px, #f2f4f8 6px); }
.warn-sw { background: #fff; border: 2px solid #e0912b; }
.job.has-warn, .tcard.has-warn { box-shadow: 0 0 0 2px #e0912b inset; }
.j-warn { width: 16px; height: 16px; color: #d9822b; flex: none; }
.warn-line { display: flex; align-items: flex-start; gap: 5px; color: #a8610c !important; font-weight: 600; white-space: normal !important; }
.warn-line .ic { flex: none; margin-top: 2px; }
.board { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.flash-warn { background: #fdebd0; color: #8a4f06; }
.conflict-box { background: #fff4e2; border: 1px solid #f0c987; border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: 13.5px; color: #8a4f06; }
.conflict-box b { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.conflict-box p { margin: 2px 0; }
.all-good { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 4px; color: #17794a; font-weight: 600; }
.lc-hint { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.form-aside-wrap { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 12px; align-self: start; }
.form-aside-wrap .form-aside { position: static; }
.delete-form { margin: 0; text-align: right; }
.chip.st-urlaub, i.st-urlaub { background: #dbe8ff; color: #1d4fb8; }
.chip.st-krank, i.st-krank { background: #fbdede; color: #b3302e; }
.chip.st-sonstige, i.st-sonstige { background: #e3e8f0; color: #475569; }

/* ---------- Verschieben per Ziehen und Hinweise ---------- */
[draggable="true"] { cursor: grab; }
[draggable="true"]:active { cursor: grabbing; }
.is-dragging { opacity: .45; }
.tdays.drop-ok, .tcol.drop-ok, .mc.drop-ok { outline: 2px dashed var(--accent); outline-offset: -3px; background-color: rgba(37, 99, 235, .06); }
.dnd-hint { color: var(--muted); font-size: 12.5px; margin: 8px 2px 0; }

.toast-box { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: min(440px, calc(100vw - 36px)); }
.toast { background: #17233b; color: #fff; border-radius: 12px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(8, 26, 66, .35); font-size: 14px; line-height: 1.4; border-left: 5px solid #3b82f6; animation: toast-in .2s ease-out; }
.toast.t-ok { border-left-color: #2dbb6f; }
.toast.t-warn { border-left-color: #f0a030; background: #3a2a0f; }
.toast.t-err { border-left-color: #e5484d; background: #3d1518; }
.toast b { display: block; margin-bottom: 2px; }
.toast ul { margin: 6px 0 0; padding-left: 18px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.head-form { margin-top: 12px; }

/* Phase 7.2: Abschluss, Checkliste, Fotos im Auftrag */
.sig-img { display: block; margin-top: 8px; max-width: 320px; width: 100%; height: auto; background: #fff; border: 1px solid var(--line, #d8e0ee); border-radius: 10px; }
.sub-h { margin: 16px 0 8px; font-size: .95rem; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.check-list li { display: flex; align-items: center; gap: 8px; color: var(--muted, #6a7a93); }
.check-list li.is-done { color: inherit; }
.check-list em { font-style: normal; font-size: .75rem; background: #fff4e2; color: #7a4506; border-radius: 999px; padding: 1px 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line, #d8e0ee); display: block; }
.inline-form { display: inline; }
