:root {
  /* Farbwerte angelehnt an ein ruhiges, Jira-ähnliches Design (Neutraltöne + Blau) */
  --bg: #ffffff; --surface: #ffffff; --sunken: #f7f8f9; --card: #ffffff;
  --text: #172b4d; --subtle: #44546f; --muted: #626f86; --line: #dcdfe4; --line-soft: #ebecf0;
  --primary: #0c66e4; --primary-d: #0055cc; --primary-bg: #e9f2ff; --focus: #388bff;
  --danger: #c9372c; --green: #1f845a; --orange: #a54800; --blue: #0c66e4; --grey: #626f86; --red: #c9372c;
  --hover: rgba(9, 30, 66, .06); --press: rgba(9, 30, 66, .14);
  --shadow-raised: 0 1px 1px rgba(9, 30, 66, .25), 0 0 1px rgba(9, 30, 66, .31);
  --shadow-overlay: 0 8px 12px rgba(9, 30, 66, .15), 0 0 1px rgba(9, 30, 66, .31);
  --radius: 4px; --side-w: 240px; --top-h: 56px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/20px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Ubuntu, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; line-height: 28px; font-weight: 500; letter-spacing: -.01em; margin: 0 0 1.25rem; }
h2 { font-size: 16px; line-height: 20px; font-weight: 600; margin: 0 0 .75rem; }
h3 { font-size: 14px; font-weight: 600; }
code { background: var(--sunken); padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.ico { width: 20px; height: 20px; flex: none; }

/* ---- Kopfleiste ---- */
.topnav { position: sticky; top: 0; z-index: 50; height: var(--top-h); display: flex; align-items: center; gap: .75rem; padding: 0 1rem 0 .75rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--text) !important; font-weight: 600; font-size: 15px; text-decoration: none !important; padding: .25rem .4rem; border-radius: 3px; }
.brand:hover { background: var(--hover); }
.brand-tile { width: 26px; height: 26px; border-radius: 6px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; border-radius: 3px; color: var(--subtle); cursor: pointer; }
.icon-btn:hover { background: var(--hover); }
.nav-toggle { display: none; }
.topsearch { position: relative; flex: 0 1 420px; margin-left: auto; }
.topsearch .ico { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.topsearch input { margin: 0; height: 32px; padding: 0 .6rem 0 2rem; background: var(--surface); border: 1px solid #8590a2; border-radius: 3px; }
.topsearch input:hover { background: var(--sunken); }
.topnav-right { display: flex; align-items: center; gap: .5rem; }
.brand + .topnav-right { margin-left: auto; } /* ohne Suche (Außendienst) */
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #1d7afc; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; cursor: pointer; list-style: none; }
.avatar:hover { box-shadow: 0 0 0 3px var(--primary-bg); }

/* Ausklappmenüs */
details.dd { position: relative; }
details.dd > summary { list-style: none; }
details.dd > summary::-webkit-details-marker { display: none; }
.create-dd > summary { display: inline-flex; align-items: center; gap: .3rem; }
.create-dd > summary .ico { width: 16px; height: 16px; }
.dd-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-overlay); padding: .4rem 0; z-index: 60; }
.dd-right { left: auto; right: 0; min-width: 260px; }
.dd-menu a, .dd-menu .dd-item { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .45rem 1rem; color: var(--text); text-decoration: none !important; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; border-left: 2px solid transparent; }
.dd-menu a:hover, .dd-menu .dd-item:hover { background: var(--hover); border-left-color: var(--primary); }
.dd-menu .ico { width: 18px; height: 18px; color: var(--subtle); }
.dd-head { display: flex; flex-direction: column; gap: .15rem; padding: .5rem 1rem .75rem; border-bottom: 1px solid var(--line-soft); margin-bottom: .3rem; }
.dd-head .lozenge { align-self: flex-start; margin-top: .3rem; }

/* ---- Seitenleiste ---- */
.shell { display: flex; min-height: calc(100vh - var(--top-h)); }
.sidebar { flex: 0 0 var(--side-w); width: var(--side-w); position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; padding: .75rem .5rem; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.side-group { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 1rem .75rem .35rem; }
.side-item { position: relative; display: flex; align-items: center; gap: .65rem; height: 36px; padding: 0 .75rem; border-radius: 3px; color: var(--subtle); font-weight: 500; text-decoration: none !important; }
.side-item:hover { background: var(--hover); color: var(--text); }
.side-item.active { background: var(--primary-bg); color: var(--primary); }
.side-item.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 2px 2px 0; background: var(--primary); }
.side-foot { margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--line-soft); }

.container { flex: 1; min-width: 0; max-width: 1280px; padding: 1.25rem 2.5rem 3rem; }
.breadcrumbs { display: flex; gap: .4rem; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: .6rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.bc-current { color: var(--muted); }

/* ---- Inhalte ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.card.narrow { max-width: 680px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; }
.grid2 .card { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: var(--card); border-radius: 8px; padding: 1rem 1.25rem; box-shadow: var(--shadow-raised); }
.stat .label { color: var(--subtle); font-size: 12px; font-weight: 600; }
.stat .value { font-size: 24px; line-height: 32px; font-weight: 600; }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--line-soft); color: var(--subtle); font-size: 12px; font-weight: 600; text-align: center; vertical-align: middle; }
.empty-state { text-align: center; padding: 3rem 1rem; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.toolbar h1 { margin: 0; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; }
.filters label { margin: 0; }
.filters input, .filters select { margin-top: .2rem; }

table.list { width: 100%; border-collapse: collapse; background: var(--surface); margin-bottom: 1.5rem; }
table.list th, table.list td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.list th { font-size: 12px; font-weight: 600; color: var(--subtle); border-bottom: 2px solid var(--line); white-space: nowrap; }
table.list tr:hover td { background: var(--sunken); }
table.list tr:first-child:hover th { background: none; }
table.list tfoot td { font-weight: 700; background: var(--sunken); }
.card table.list { margin-bottom: 0; }
.num { text-align: right !important; white-space: nowrap; }
.actions { white-space: nowrap; text-align: right !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

label { display: block; margin-bottom: .9rem; font-size: 12px; line-height: 16px; color: var(--subtle); font-weight: 600; }
input, select, textarea { display: block; width: 100%; margin-top: .3rem; padding: .4rem .5rem; min-height: 36px; border: 1px solid #8590a2; border-radius: 3px; font-family: inherit; font-size: 14px; line-height: 20px; color: var(--text); background: var(--surface); font-weight: 400; }
input:hover, select:hover, textarea:hover { background: var(--sunken); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: inset 0 0 0 1px var(--focus); background: var(--surface); }
input[type=checkbox], input[type=radio] { display: inline; width: auto; min-height: 0; margin-right: .45rem; accent-color: var(--primary); }
input[type=file] { border-style: dashed; padding: .35rem; }
textarea { min-height: 80px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 1rem; }
.checkbox { display: flex; align-items: center; font-weight: 400; font-size: 14px; color: var(--text); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; height: 32px; padding: 0 .75rem; border-radius: 3px; border: 0; background: rgba(9, 30, 66, .06); color: var(--subtle); font-family: inherit; font-size: 14px; line-height: 20px; font-weight: 500; cursor: pointer; text-decoration: none !important; white-space: nowrap; vertical-align: middle; }
.btn:hover { background: rgba(9, 30, 66, .14); color: var(--text); }
.btn:active { background: rgba(9, 30, 66, .22); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-d); color: #fff; }
.btn.primary:active { background: #09326c; }
.btn.danger { background: none; color: var(--danger); box-shadow: inset 0 0 0 1px #f87168; }
.btn.danger:hover { background: #ffeceb; }
.btn.small { height: 24px; padding: 0 .5rem; font-size: 12px; }
.btn.block { width: 100%; }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button.link { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; }
form.inline { display: inline; }

/* Lozenges (Statusanzeigen) */
.badge, .lozenge { display: inline-block; padding: 0 4px; border-radius: 3px; font-size: 11px; line-height: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; white-space: nowrap; vertical-align: middle; background: #dcdfe4; color: #44546f; }
.badge.grey, .lozenge.grey { background: #dcdfe4; color: #44546f; }
.badge.green, .lozenge.green { background: #baf3db; color: #216e4e; }
.badge.red, .lozenge.red { background: #ffd5d2; color: #ae2e24; }
.badge.orange, .lozenge.orange { background: #fedec8; color: #a54800; }
.badge.blue, .lozenge.blue { background: #cce0ff; color: #0055cc; }

/* Hinweise (Section Messages) */
.flash { position: relative; padding: .75rem 1rem .75rem 2.6rem; border-radius: 3px; margin-bottom: 1rem; border: 0; color: var(--text); }
.flash::before { position: absolute; left: .9rem; top: .7rem; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; }
.flash-success { background: #dcfff1; } .flash-success::before { content: "✓"; background: var(--green); }
.flash-error { background: #ffeceb; } .flash-error::before { content: "!"; background: var(--danger); }
.flash-warning { background: #fff7d6; } .flash-warning::before { content: "!"; background: #b38600; }
.flash-info { background: #e9f2ff; } .flash-info::before { content: "i"; background: var(--primary); }

/* Anmeldung */
body.auth { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1.5rem 1rem; background: #f7f8f9 url('login-bg.svg') center bottom / cover no-repeat; }
.auth-box { position: relative; background: var(--surface); padding: 2rem 2.5rem; border-radius: 8px; width: 100%; max-width: 400px; box-shadow: 0 8px 24px rgba(9, 30, 66, .12), 0 0 1px rgba(9, 30, 66, .31); }
.auth-box h1 { font-size: 16px; font-weight: 600; text-align: center; color: var(--subtle); }

.code-input { font-size: 1.4rem; letter-spacing: .3em; text-align: center; max-width: 240px; }
.qr { width: 220px; height: 220px; margin: .75rem 0; }
.qr svg { width: 100%; height: 100%; }
.secret { font-size: 1rem; letter-spacing: .05em; word-break: break-all; }
.steps li { margin-bottom: 1.25rem; }
.recovery { columns: 2; list-style: none; padding: 0; font-size: 1.1rem; }
.recovery li { margin: .3rem 0; }
details { margin: .75rem 0; } summary { cursor: pointer; color: var(--primary); margin-bottom: .5rem; }

/* Positionen */
#items input, #items textarea, #items select { margin: 0; }
#items .w-unit select { min-width: 0; width: 100%; padding-left: .4rem; padding-right: 1.2rem; }
#items textarea { min-height: 56px; height: 56px; resize: vertical; } /* 2 Zeilen ohne Scrollen */
#items td { padding: .35rem .4rem; }
#items .w-qty { width: 90px; } #items .w-unit { width: 135px; } #items .w-price { width: 120px; } #items .w-tax { width: 80px; }
.sumbox { margin-left: auto; max-width: 340px; }
.sumbox div { display: flex; justify-content: space-between; padding: .2rem 0; }
.sumbox .gross { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--text); margin-top: .3rem; padding-top: .4rem; }

/* Druckansicht (DIN A4) */
.print-page { background: #fff; max-width: 210mm; min-height: 297mm; margin: 0 auto; padding: 20mm 20mm 25mm 25mm; font-size: 10.5pt; color: #000; position: relative; }
.print-toolbar { max-width: 210mm; margin: 1rem auto; display: flex; gap: .5rem; }
.print-page .sender-line { font-size: 7.5pt; text-decoration: underline; margin-bottom: 2mm; }
.print-page .head { display: flex; justify-content: space-between; margin-bottom: 15mm; }
.print-page .company { text-align: right; font-size: 9pt; }
.print-page .company strong { font-size: 13pt; }
.print-page .address { min-height: 40mm; }
.print-page .meta { margin-bottom: 8mm; }
.print-page .meta table td { padding: 0 6mm 0 0; }
.print-page h2 { font-size: 14pt; margin: 0 0 4mm; }
.print-page table.items { width: 100%; border-collapse: collapse; margin: 5mm 0; }
.print-page table.items th { border-bottom: 1px solid #000; text-align: left; padding: 1.5mm 1mm; font-size: 9pt; }
.print-page table.items td { padding: 1.5mm 1mm; border-bottom: 1px solid #ddd; vertical-align: top; }
.print-page .totals { margin-left: auto; width: 75mm; }
.print-page .totals div { display: flex; justify-content: space-between; padding: .7mm 0; }
.print-page .totals .gross { font-weight: bold; border-top: 1px solid #000; margin-top: 1mm; padding-top: 1.5mm; }
.print-page .footer { position: absolute; bottom: 10mm; left: 25mm; right: 20mm; display: flex; justify-content: space-between; gap: 5mm; font-size: 7.5pt; color: #444; border-top: 1px solid #ccc; padding-top: 2mm; }
.print-body { background: #e5e7eb; margin: 0; }
@media print {
  @page { size: A4; margin: 0; }
  .print-toolbar, .topbar, .no-print { display: none !important; }
  .print-body, body { background: #fff; }
  .print-page { margin: 0; box-shadow: none; }
}

/* Kalender / Plantafel */
.autoplan { align-items: center; }
.cal-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table.cal { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 1000px; }
table.cal th, table.cal td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
table.cal thead th { background: #f8f9fb; font-size: .85rem; padding: .5rem; }
.cal-emp { width: 170px; padding: .5rem; background: #fbfbfc; font-size: .9rem; }
.cal-cell { padding: .3rem; min-height: 90px; height: 90px; position: relative; }
.cal-cell.cal-weekend, th.cal-weekend { background: #fafafa; }
.cal-today { background: #f2f6ff !important; }
.cal-absent { background: repeating-linear-gradient(45deg, #fff, #fff 6px, #f3f4f6 6px, #f3f4f6 12px) !important; }
.cal-unassigned th, .cal-unassigned td { background: #fffaf0; }
.cal-cell .badge { display: inline-block; margin-bottom: .2rem; }
.shift { display: block; font-size: .75rem; color: var(--muted); margin-bottom: .2rem; text-decoration: none !important; }
.shift-manual { font-weight: 700; color: #374151; }
.shift-add { opacity: 0; }
.cal-cell:hover .shift-add, .cal-cell:hover .cal-add { opacity: 1; }
.cal-add { position: absolute; right: 4px; bottom: 2px; opacity: 0; font-weight: 700; font-size: 1.1rem; text-decoration: none !important; }
.appt { display: block; background: #e8eefc; border-left: 3px solid var(--primary); border-radius: 4px; padding: .2rem .35rem; margin-bottom: .25rem; font-size: .78rem; line-height: 1.25; color: var(--text); text-decoration: none !important; cursor: grab; overflow: hidden; }
.appt:hover { background: #dbe5fb; }
.appt-time { display: block; font-weight: 600; color: var(--primary-d); }
.appt-title { display: block; font-weight: 600; }
.appt-cust { display: block; color: var(--muted); }
.appt-done { background: #e8f6ee; border-left-color: var(--green); cursor: pointer; opacity: .75; }
.appt-open { display: inline-block; width: calc(50% - .3rem); margin-right: .25rem; vertical-align: top; background: #fff6e5; border-left-color: var(--orange); }
.appt.dragging { opacity: .4; }
.drop-hover { outline: 2px dashed var(--primary); outline-offset: -2px; background: #eef3ff !important; }
.cal-open { min-height: 140px; }
fieldset.mode { border: 1px solid var(--line); border-radius: 6px; padding: .5rem .75rem .25rem; margin: 0 0 .8rem; }
table.pattern input { margin: 0; }
table.pattern td { padding: .3rem .5rem; }

/* Feiertage */
th.cal-holiday, td.cal-holiday { background: #fff4f4 !important; }
.holiday-name { font-size: .72rem; color: #b42318; font-weight: 600; }
table.cal thead th a { color: inherit; }

/* Tagesansicht mit Zeitraster */
.day-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.day-head, .day-body { display: flex; min-width: 800px; }
.day-head { border-bottom: 1px solid var(--line); background: #f8f9fb; position: sticky; top: 0; z-index: 3; }
.day-axis-head, .day-axis { flex: 0 0 56px; }
.day-col-head { flex: 1 1 0; padding: .5rem; border-left: 1px solid var(--line); font-size: .88rem; min-width: 150px; }
.day-body { position: relative; }
.day-axis { position: relative; border-right: 1px solid var(--line); }
.day-hour { position: absolute; right: 6px; transform: translateY(-50%); font-size: .72rem; color: var(--muted); }
.day-hour:first-child { transform: none; }
.day-col { flex: 1 1 0; position: relative; border-left: 1px solid var(--line); min-width: 150px; cursor: copy;
  background-image: linear-gradient(to bottom, #e9ecf1 1px, transparent 1px), linear-gradient(to bottom, #f4f5f7 1px, transparent 1px);
  background-size: 100% 72px, 100% 18px; }
.day-unassigned { background-color: #fffaf0; }
.day-shift { position: absolute; left: 0; right: 0; background: rgba(36, 83, 212, .06); border-top: 2px solid rgba(36, 83, 212, .25); border-bottom: 2px solid rgba(36, 83, 212, .25); pointer-events: none; }
.day-absent { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.6), rgba(255,255,255,.6) 6px, rgba(220,223,228,.6) 6px, rgba(220,223,228,.6) 12px); padding: .4rem; pointer-events: none; }
.day-holiday-col { background: repeating-linear-gradient(45deg, rgba(255,244,244,.7), rgba(255,244,244,.7) 6px, rgba(253,226,226,.7) 6px, rgba(253,226,226,.7) 12px); }
.day-appt { position: absolute; z-index: 2; display: block; overflow: hidden; background: #e8eefc; border-left: 3px solid var(--primary); border-radius: 4px; padding: .15rem .35rem; font-size: .75rem; line-height: 1.25; color: var(--text); text-decoration: none !important; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.day-appt:hover { background: #dbe5fb; z-index: 4; }
.day-appt.appt-done { background: #e8f6ee; border-left-color: var(--green); }
.day-indicator { position: absolute; z-index: 5; border: 2px dashed var(--primary); background: rgba(36, 83, 212, .08); border-radius: 4px; pointer-events: none; }
.day-indicator span { position: absolute; top: -1px; left: 4px; font-size: .72rem; font-weight: 700; color: var(--primary-d); }
.day-now { position: absolute; left: 56px; right: 0; border-top: 2px solid #e5484d; z-index: 3; pointer-events: none; }

/* Einsatz beim Kunden */
.shift-cust { display: block; color: #0b6b4f; font-weight: 600; }
.day-shift-cust { background: rgba(31, 138, 76, .07); border-color: rgba(31, 138, 76, .35); }
table.pattern select { margin: 0; }

/* Zuständige Kunden / Mitarbeiter */
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .1rem 1rem; margin-bottom: 1rem; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; padding: .6rem .8rem; }
.checklist label { margin: .15rem 0; font-weight: 400; }

/* Modal-Dialog */
dialog.modal { border: 0; border-radius: 12px; padding: 1.5rem 1.5rem 1rem; width: min(980px, 94vw); max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); background: var(--bg); }
dialog.modal::backdrop { background: rgba(17, 24, 39, .45); }
.modal-close { position: sticky; top: 0; float: right; margin: -.75rem -.75rem 0 0; z-index: 2; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.modal-close:hover { background: #f1f3f6; }
.modal-body h1 { font-size: 1.35rem; margin-right: 2.5rem; }
.modal-body .card { margin-bottom: 1rem; }
.modal-body .card.narrow { max-width: none; }
.modal-body.loading { opacity: .5; pointer-events: none; }

/* Notizen im Kalender */
.appt-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #4b5563; font-style: italic; margin-top: .1rem; white-space: normal; }
.cal-note { display: block; font-size: .72rem; color: #4b5563; font-style: italic; line-height: 1.25; margin: .1rem 0 .25rem; overflow: hidden; text-overflow: ellipsis; }
.day-absent .cal-note { margin-top: .3rem; background: rgba(255,255,255,.85); border-radius: 4px; padding: .1rem .3rem; display: inline-block; }

/* Mehrtägige Termine + Mitarbeiter-Link */
.appt-part { display: inline-block; margin-left: .2rem; padding: 0 .3rem; border-radius: 3px; background: rgba(36,83,212,.12); font-size: .68rem; font-weight: 700; color: var(--primary-d); }
.appt-multi { border-left-width: 3px; }
.appt-multi.appt-next { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: -.3rem; box-shadow: inset -3px 0 0 rgba(36,83,212,.25); }
.appt-multi.appt-cont { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-style: dashed; }
a.emp-link { color: var(--text); text-decoration: none; border-bottom: 1px dashed #9aa3b2; }
a.emp-link:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* Vertretung */
.appt-subst { display: block; color: #7a4d00; font-weight: 600; font-size: .72rem; }
.cal-subst { display: block; font-size: .72rem; color: #7a4d00; font-weight: 600; margin: .1rem 0 .2rem; }
.day-absent .cal-subst { background: rgba(255,255,255,.85); border-radius: 4px; padding: .1rem .3rem; display: inline-block; margin-left: .3rem; }

/* Ansprechpartner */
table.contacts td { vertical-align: middle; }

/* Webseiten-Abgleich / Logo */
.lookup-bar { display: flex; gap: .75rem; align-items: flex-end; }
.lookup-bar label { flex: 1; }
.lookup-bar .btn { margin-bottom: .8rem; white-space: nowrap; }
.lookup-result { border: 1px solid #c3d5fb; background: #f5f8ff; border-radius: 8px; padding: .9rem 1rem; margin-bottom: 1rem; }
.lookup-result h3 { font-size: .95rem; margin: .6rem 0 .4rem; }
.lookup-table td { padding: .3rem .5rem; }
.logo-row { display: flex; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.customer-logo { max-height: 56px; max-width: 180px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 4px; }
.customer-title { display: flex; align-items: center; gap: .75rem; }
.customer-logo-sm { display: block; height: 28px; max-width: 72px; object-fit: contain; }
.list .logo-col { width: 84px; }
.list td.logo-col { padding-top: .35rem; padding-bottom: .35rem; }
.logo-pick { display: flex; align-items: center; gap: .6rem; }
.lookup-table td:first-child { width: 2rem; }
.lookup-table td:nth-child(2) { width: 9rem; color: var(--muted, #667); }
.logo-upload { margin: 0; font-size: .9rem; }
.logo-upload input[type=file] { display: block; margin-top: .25rem; padding: .3rem; }

/* ---- Feinschliff im Atlassian-Stil für Fachbereiche ---- */
.appt, .day-appt { background: #e9f2ff; border-left-color: var(--primary); border-radius: 3px; }
.appt:hover, .day-appt:hover { background: #cce0ff; }
.appt-done, .day-appt.appt-done { background: #dcfff1; border-left-color: var(--green); }
.appt-open { background: #fff7d6; border-left-color: #e2b203; }
table.cal thead th, .day-head { background: var(--sunken); color: var(--subtle); }
.cal-emp { background: var(--surface); }
.cal-today { background: #f0f6ff !important; }
.cal-wrap, .day-wrap { border-radius: 8px; border-color: var(--line); }
dialog.modal { background: var(--surface); border-radius: 4px; box-shadow: var(--shadow-overlay); padding: 1.5rem 1.75rem 1rem; }
dialog.modal::backdrop { background: rgba(9, 30, 66, .54); }
.modal-close { border: 0; border-radius: 3px; background: none; color: var(--subtle); }
.modal-close:hover { background: var(--hover); }
.modal-body h1 { font-size: 20px; line-height: 24px; }
.modal-body .card { border: 0; padding: 0; }
.lookup-result { border: 0; background: var(--sunken); border-radius: 4px; }
.checklist { border-color: var(--line); border-radius: 3px; }
fieldset.mode { border-color: var(--line); border-radius: 3px; }
.customer-logo { border-color: var(--line); border-radius: 4px; }
.lookup-bar .btn { margin-bottom: .9rem; height: 36px; }

/* Schmale Bildschirme: Seitenleiste ein-/ausklappbar */
@media (max-width: 960px) {
  .nav-toggle { display: grid; }
  .brand-name { display: none; }
  .sidebar { position: fixed; left: 0; top: var(--top-h); z-index: 40; transform: translateX(-100%); transition: transform .15s ease; box-shadow: var(--shadow-overlay); }
  body.nav-open .sidebar { transform: none; }
  .container { padding: 1rem; }
  .topsearch { flex-basis: 200px; }
}
@media print { .topnav, .sidebar, .breadcrumbs { display: none !important; } .container { padding: 0; } }
.auth-brand { display: flex; justify-content: center; margin-bottom: .75rem; }
.auth-brand .brand-tile { width: 40px; height: 40px; border-radius: 8px; font-size: 20px; }
.auth-box .muted { text-align: center; }
.filters input, .filters select { width: auto; min-width: 120px; }
.filters input[type=search] { min-width: 240px; }
.container { overflow-x: auto; }
.logo-upload { font-size: 12px; }
.sidebar > * { flex-shrink: 0; }
.filters input[type=checkbox], .filters input[type=radio] { min-width: 0; }

/* Zeilenaktionen in Listen */
.row-actions { width: 1%; }
.row-actions .btn.small { width: 28px; height: 28px; padding: 0; background: none; color: var(--subtle); }
.row-actions .btn.small .ico { width: 18px; height: 18px; }
.row-actions .btn.small:hover { background: var(--hover); color: var(--text); }
.row-actions .danger-subtle:hover { background: #ffeceb; color: var(--danger); }
.row-actions .btn.disabled { opacity: .35; cursor: not-allowed; }
.row-actions .btn.disabled:hover { background: none; color: var(--subtle); }
table.list tr .row-actions > * { opacity: .55; }
table.list tr:hover .row-actions > *, .row-actions > *:focus-within, .row-actions a:focus-visible { opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

[hidden] { display: none !important; }
.auth-links { text-align: center; margin: 1.1rem 0 0; font-size: 14px; }
.auth-box .flash { text-align: left; }
@media (max-width: 700px) { body.auth { background-size: auto 100%; background-position: 18% bottom; } .auth-box { padding: 1.5rem; } }

/* Reiter (Kundenbereich) */
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--line-soft); margin: -.5rem 0 1.25rem; }
.tab { position: relative; padding: .5rem .75rem .6rem; color: var(--subtle); font-weight: 500; text-decoration: none !important; border-radius: 3px 3px 0 0; }
.tab:hover { color: var(--text); background: var(--hover); }
.tab.active { color: var(--primary); }
.tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--primary); }
.tab .count { margin-left: .25rem; }
.tab.active .count { background: var(--primary-bg); color: var(--primary); }

/* Passwortmanager */
.vault { position: relative; }
.vault .ico { width: 16px; height: 16px; vertical-align: -3px; }
.vault-table td { vertical-align: middle; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.secret { letter-spacing: .08em; }
.secret.shown { letter-spacing: normal; background: #fff7d6; padding: 1px 4px; border-radius: 3px; user-select: all; }
.nowrap { white-space: nowrap; }
.btn.small.icon { width: 26px; height: 26px; padding: 0; background: none; color: var(--subtle); vertical-align: middle; }
.btn.small.icon:hover { background: var(--hover); color: var(--text); }
.vault-notes { white-space: pre-wrap; background: var(--sunken); border-radius: 3px; padding: .4rem .6rem; margin: .35rem 0; max-width: 420px; }
.toast { position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%); background: #172b4d; color: #fff; padding: .55rem 1rem; border-radius: 4px; box-shadow: var(--shadow-overlay); z-index: 100; font-size: 14px; }
.secret-input { display: flex; gap: .4rem; align-items: center; margin-top: .3rem; }
.secret-input input { margin-top: 0; flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.secret-input .btn { height: 36px; }

.group-row th { background: var(--sunken); color: var(--text); font-size: 12px; font-weight: 600; text-transform: none; padding-top: .45rem; padding-bottom: .45rem; border-bottom: 1px solid var(--line); }
table.list tr.group-row:hover th { background: var(--sunken); }
.type-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; margin-right: .45rem; vertical-align: middle; background: var(--primary-bg); color: var(--primary); }
.type-ico .ico { width: 15px; height: 15px; vertical-align: 0; }
.type-email { background: #fff7d6; color: #a54800; } .type-ftp, .type-sftp { background: #dcfff1; color: #216e4e; }
.type-ssh { background: #f3f0ff; color: #5e4db2; } .type-database { background: #ffeceb; color: #ae2e24; }
.type-wlan { background: #e7f9ff; color: #206a83; } .type-software { background: #f1f2f4; color: #44546f; } .type-other { background: #f1f2f4; color: #44546f; }
.cred-meta { display: flex; flex-wrap: wrap; gap: .1rem 1rem; margin-top: .15rem; }
.cred-meta .btn.small.icon { width: 22px; height: 22px; }
.vault .create-dd .dd-menu a { padding: .4rem 1rem; }

/* Verlauf & Wiedervorlagen */
.crm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.crm-grid > .card { margin-bottom: 0; }
@media (max-width: 1100px) { .crm-grid { grid-template-columns: 1fr; } }
.pills { display: flex; flex-wrap: wrap; gap: .35rem; margin: .25rem 0 1rem; }
.pill { padding: .2rem .7rem; border-radius: 999px; background: var(--hover); color: var(--subtle); font-size: 13px; font-weight: 500; text-decoration: none !important; }
.pill:hover { background: var(--press); color: var(--text); }
.pill.active { background: var(--primary-bg); color: var(--primary); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--line-soft); }
.tl-day { position: relative; margin: 1rem 0 .4rem 44px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.tl-day:first-child { margin-top: 0; }
.tl-item { position: relative; display: flex; gap: .75rem; padding: .35rem 0 .6rem; }
.tl-ico { position: relative; z-index: 1; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-bg); color: var(--primary); box-shadow: 0 0 0 3px var(--surface); }
.tl-ico .ico { width: 16px; height: 16px; }
.tl-note .tl-ico { background: #f1f2f4; color: #44546f; }
.tl-meeting .tl-ico, .tl-visit .tl-ico { background: #dcfff1; color: #216e4e; }
.tl-sys .tl-ico { background: #f7f8f9; color: var(--muted); box-shadow: 0 0 0 3px var(--surface), inset 0 0 0 1px var(--line); }
.tl-paid .tl-ico, .tl-taskdone .tl-ico { background: #dcfff1; color: #216e4e; box-shadow: 0 0 0 3px var(--surface); }
.tl-dunning .tl-ico { background: #ffeceb; color: #ae2e24; box-shadow: 0 0 0 3px var(--surface); }
.tl-body { flex: 1; min-width: 0; padding-top: .3rem; }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.tl-text { margin-top: .3rem; padding: .5rem .75rem; background: var(--sunken); border-radius: 4px; }
.tl-meta { margin-top: .2rem; }
.tl-actions { margin-left: auto; opacity: 0; transition: opacity .1s; }
.tl-item:hover .tl-actions, .tl-actions:focus-within { opacity: 1; }
.tl-actions > * { opacity: 1 !important; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px solid var(--line-soft); }
.task-list li:last-child { border-bottom: 0; }
.task-check { width: 18px; height: 18px; margin-top: 2px; border: 2px solid #8590a2; border-radius: 4px; background: var(--surface); cursor: pointer; padding: 0; flex: none; }
.task-check:hover { border-color: var(--green); background: #dcfff1; }
.task-check:hover::after { content: "✓"; display: block; color: var(--green); font-size: 12px; line-height: 13px; font-weight: 700; text-align: center; }
fieldset.followup { border: 1px solid var(--line); border-radius: 4px; padding: .6rem .9rem .1rem; margin: 0 0 1rem; }

/* Kennzahlen auf der Kundenseite */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: .5rem; }
.kpis .stat { padding: .85rem 1rem; }
.kpis .stat .value { font-size: 20px; line-height: 28px; }
.kpis .stat.warn { box-shadow: inset 3px 0 0 #e2483d, var(--shadow-raised); }
.kpis .up { color: var(--green); font-weight: 600; } .kpis .down { color: var(--danger); font-weight: 600; }
.kpi-foot { margin: 0 0 1.25rem; }
.rev-chart .bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin-top: .4rem; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.bar-col .bar { width: 100%; max-width: 26px; border-radius: 3px 3px 0 0; background: #cce0ff; }
.bar-col .bar.current { background: var(--primary); }
.bar-col span { font-size: 10px; color: var(--muted); line-height: 12px; }
/* Dateiablage */
.dropzone { position: relative; display: block; border: 2px dashed #b3b9c4; border-radius: 8px; padding: 1.4rem 1rem; text-align: center; color: var(--text); font-weight: 400; font-size: 14px; cursor: pointer; background: var(--sunken); }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-bg); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; margin: 0; }
.dz-list { display: block; margin-top: .5rem; color: var(--subtle); }
.dz-list .too-big { color: var(--danger); font-weight: 600; }
.files-table td { vertical-align: middle; }
.file-cell { display: flex; align-items: center; gap: .6rem; }
.file-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: #fff; flex: none; }
.file-ext { width: 40px; text-align: center; flex: none; }

.addr-list { list-style: none; margin: 0; padding: 0; }
.addr-list li { padding: .55rem 0; border-bottom: 1px solid var(--line-soft); }
.addr-list li:last-child { border-bottom: 0; }
.addr-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .15rem; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
dl.kv dt { color: var(--subtle); font-size: 13px; }
dl.kv dd { margin: 0; }
.addr-head .row-actions { width: auto; display: flex; gap: 2px; align-items: center; }
h2 > details.dd { vertical-align: middle; margin-left: .25rem; }
h2 > details.dd > summary { vertical-align: middle; }
.count.warn { background: #fedec8; color: #a54800; }

.tag-row { display: flex; flex-wrap: wrap; gap: 4px; margin: .2rem 0 0; }
h1 + .tag-row, .toolbar + .tag-row { margin: -.75rem 0 1rem; }
.tag { display: inline-block; padding: 0 .45rem; border-radius: 3px; background: #f1f2f4; color: var(--subtle); font-size: 12px; line-height: 18px; text-decoration: none !important; }
.tag:hover { background: var(--primary-bg); color: var(--primary); }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.table-scroll { overflow-x: auto; max-height: 420px; overflow-y: auto; margin-bottom: 1rem; }
.text-danger { color: var(--danger); }
.filters select[data-autosubmit] { min-width: 160px; }
.filters > details.dd { align-self: flex-end; margin: 0; padding: 0; height: 32px; }
.filters > details.dd > summary.btn { display: flex; margin: 0; }

/* Sammelaktion + Filter in einer Zeile */
.list-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: .9rem 1.25rem; }
.list-bar .list-filters { margin-left: auto; flex-wrap: nowrap; }
.bulk-bar { display: flex; flex-wrap: nowrap; align-items: flex-end; gap: .5rem; margin: 0; }
.bulk-bar label, .list-bar .filters label { margin: 0; font-size: 12px; white-space: nowrap; }
.bulk-bar select { margin-top: .2rem; width: 190px; min-width: 0; }
.bulk-bar input[type=date] { margin-top: .2rem; width: 140px; min-width: 0; }
.list-bar .filters select { width: 130px; min-width: 0; }
.list-bar .filters input[type=number] { min-width: 0; }
.bulk-count:empty { display: none; }
@media (max-width: 700px) { .bulk-bar, .list-bar .list-filters { flex-wrap: wrap; } }
table.list th.sel, table.list td.sel { width: 32px; padding-right: 0; }
table.list td.sel input, table.list th.sel input { width: 16px; height: 16px; margin: 0; vertical-align: middle; }
table.list tr.selected td { background: #e9f2ff; }

/* E-Rechnung */
.card.einvoice { margin-top: 1.25rem; }
.einvoice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.einvoice h3 { margin: 0 0 .25rem; font-size: 14px; display: flex; align-items: center; gap: .5rem; }
.einvoice-missing { margin-top: 1rem; padding: .75rem 1rem; background: #fffae6; border: 1px solid #f5cd47; border-radius: 3px; font-size: 13px; }
.einvoice-missing ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.einvoice-missing li { margin: .15rem 0; }
@media (max-width: 800px) { .einvoice-grid { grid-template-columns: 1fr; } }

/* Archiv & Verlauf (GoBD) */
.card.archive, .card.history { margin-top: 1.25rem; }
.card.archive h2 .small { font-weight: 400; }
code.hash { font-size: 12px; background: var(--surface-2, #f1f2f4); padding: 1px 5px; border-radius: 3px; }

/* E-Mail-Versand */
.mail-form textarea { font-family: inherit; }
.mail-form fieldset.attachments { border: 1px solid var(--border, #dcdfe4); border-radius: 3px; padding: .5rem .9rem .7rem; margin: .5rem 0 .9rem; }
.mail-form fieldset.attachments legend { font-size: 12px; font-weight: 600; padding: 0 .3rem; }
.mail-form .checkbox { display: block; margin: .3rem 0; }
.mail-form .form-actions { display: flex; gap: .5rem; margin-top: 1rem; }

/* Belegnummern nicht umbrechen (z. B. RE-2026-0004) */
table.list td a[href*="rechnungen/"], table.list td a[href*="angebote/"], table.list td a[href*="page=invoices"], table.list td a[href*="page=quotes"] { white-space: nowrap; }

/* Artikel- und Leistungskatalog */
.item-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .75rem 0 1rem; }
.cat-picker { position: relative; flex: 1 1 320px; max-width: 480px; }
.cat-picker > .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.cat-picker input[type=search] { width: 100%; padding-left: 34px; margin: 0; }
.cat-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; max-height: 320px; overflow-y: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-overlay); padding: .3rem 0; z-index: 70; }
.cat-hit { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; width: 100%; padding: .45rem .8rem; border: 0; background: none; text-align: left; font: inherit; cursor: pointer; color: inherit; }
.cat-hit:hover, .cat-hit.active { background: #e9f2ff; }
.cat-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-meta { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.cat-none { padding: .5rem .8rem; color: var(--muted); font-size: 13px; }
.cat-desc { white-space: pre-line; }
.dd-menu .dd-file { display: flex; width: 100%; padding: .45rem 1rem; margin: 0; font: inherit; color: var(--text); cursor: pointer; border-left: 2px solid transparent; }
.dd-menu .dd-file:hover { background: var(--hover); border-left-color: var(--primary); }
tr.muted td { color: var(--muted); }

/* Mobile Ansicht „Meine Planung“ */
.m-wrap { max-width: 640px; margin: 0 auto; }
.m-dayhead { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.m-daytitle { flex: 1; text-align: center; }
.m-daytitle h1 { margin: 0 0 .15rem; }
.m-arrow { font-size: 22px; line-height: 1; min-width: 44px; height: 44px; justify-content: center; }
.m-center { text-align: center; }
.m-empform { margin-bottom: 1rem; }
.m-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; margin-bottom: .75rem; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-raised, 0 1px 1px rgba(9,30,66,.25), 0 0 1px rgba(9,30,66,.31)); color: var(--text); text-decoration: none !important; }
.m-card:active { background: var(--hover); }
.m-card-time { flex: none; width: 52px; font-weight: 600; font-size: 16px; text-align: center; }
.m-card-time span { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.m-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; align-items: flex-start; }
.m-card-title { font-weight: 600; font-size: 16px; }
.m-chev { font-size: 24px; color: var(--muted); }
.m-back { margin: 0 0 .5rem; }
.m-title { margin-bottom: .25rem; }
.m-sub { margin-top: 0; }
.m-sec { margin-bottom: 1rem; }
.m-sec h2 { margin-bottom: .6rem; }
.m-sec h3 { font-size: 13px; margin: .9rem 0 .25rem; }
.m-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .75rem 0 .25rem; }
.m-actions .btn { flex: 1; justify-content: center; min-height: 44px; }
.m-contact { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--line-soft); }
.m-pre { white-space: pre-line; margin: 0; }
.m-big { display: flex; width: 100%; justify-content: center; min-height: 48px; font-size: 16px; margin: .5rem 0; }
.m-running { font-size: 15px; margin: 0 0 .25rem; }
.m-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.m-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
.m-row3 input { min-width: 0; }
.m-sign { margin-top: 1rem; }
.m-times { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; text-align: center; margin-bottom: .75rem; }
.m-times span { display: block; font-size: 12px; color: var(--muted); }
.m-times strong { font-size: 16px; }
.sig-box { position: relative; margin: .75rem 0; border: 1px dashed #8590a2; border-radius: 6px; background: #fff; }
.sig-box canvas { display: block; width: 100%; height: 220px; touch-action: none; cursor: crosshair; border-radius: 6px; }
.sig-hint { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: var(--muted); pointer-events: none; border-top: 1px solid var(--line); margin: 0 1.5rem; padding-top: .35rem; font-size: 13px; }
.sig-clear { position: absolute; top: 6px; right: 6px; }
@media (max-width: 420px) { .m-times { grid-template-columns: 1fr 1fr; } .m-row3 { grid-template-columns: 1fr 1fr; } .m-row3 label:last-child { grid-column: 1 / -1; } }
.m-plan { text-align: center; padding: .55rem .75rem; margin: -.25rem 0 1rem; border-radius: var(--radius); background: #e9f2ff; color: #0c2d6b; font-size: 14px; }
.m-plan-off { background: #fff7d6; color: #533f04; }
.m-matpick { max-width: none; margin: .25rem 0 .4rem; }
.m-form label[for="m-material"] { margin-bottom: 0; }
.m-form #m-material { margin-top: 0; }
.m-matpick .cat-title { white-space: normal; }
