/* Bewerbungs-Assistent */
.bw-main { max-width: 1080px; }
#bw { margin: 12px 0 30px; }
.bw-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.bw-steps button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--r-pill); padding: 6px 12px; font: inherit; font-size: .88rem; cursor: pointer; }
.bw-steps button.done { border-color: #a7f3d0; background: #ecfdf5; }
.bw-steps button.on { background: #4f46e5; border-color: #4f46e5; color: #fff; font-weight: 700; }
.bw-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l); padding: 18px; box-shadow: 0 4px 18px rgba(30, 27, 75, .05); }
.bw-body h2 { margin: 0 0 6px; font-size: 1.25rem; }
.bw-body h3 { margin: 16px 0 6px; font-size: 1rem; }
.bw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 12px 0; }
@media (max-width: 640px) { .bw-grid { grid-template-columns: 1fr; } }
.bw-f { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.bw-f.wide { grid-column: 1 / -1; }
.bw-f > span { font-weight: 600; color: #33335c; }
.bw-f i { font-weight: 400; color: #8a8db5; font-size: .8rem; }
.bw-f input, .bw-f textarea, .bw-sel, .bw-opts select { font: inherit; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--r-m); background: var(--surface); color: var(--text); }
.bw-f textarea { resize: vertical; }
.bw-f input:focus, .bw-f textarea:focus { outline: none; box-shadow: var(--focus); border-color: var(--accent); background: var(--surface); }
.bw-f small { color: #6b6f99; font-size: .8rem; }
.bw-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bw-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.bw-hint { color: #8a8db5; font-size: .8rem; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn, .btn-sec { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-m); padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; border: 1px solid transparent; }
.btn { background: #4f46e5; color: #fff; }
.btn:hover { background: #4338ca; }
.btn-sec { background: #eef0ff; color: #3730a3; border-color: #d6d9f5; }
.btn-sec:hover { background: #e0e3ff; }
.btn-sec.sm { padding: 4px 9px; font-size: .85rem; }
.btn-sec.del { color: #b91c1c; }
.btn-sec:disabled { opacity: .4; cursor: default; }
.btn-sec.file { position: relative; }
.cost-note { font-weight: 400; font-size: .85em; opacity: .85; }
.muted { color: #6b6f99; } .small { font-size: .85rem; }
.bw-center { text-align: center; }
.bw-start { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
@media (max-width: 760px) { .bw-start { grid-template-columns: 1fr; } }
.bw-card { border: 1px solid var(--border); border-radius: var(--r-l); padding: 16px; background: var(--surface); }
.bw-card.big { background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, #ec4899 8%, var(--surface))); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.bw-card.wide, .bw-start > .bw-center { grid-column: 1 / -1; }
.bw-card.login { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.bw-card.login p { margin: 0; flex: 1 1 300px; }
.bw-card h2 { font-size: 1.1rem; }
.bw-saved { list-style: none; padding: 0; margin: 0; }
.bw-saved li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #ececf7; flex-wrap: wrap; }
.bw-saved li small { display: block; color: #8a8db5; }
.bw-item { border: 1px solid var(--border); border-radius: var(--r-m); padding: 10px 12px; margin: 10px 0; background: var(--surface-2); }
.bw-item-head { display: flex; justify-content: space-between; align-items: center; }
.bw-item-head span { display: flex; gap: 4px; }
.bw-photo-row { display: flex; gap: 14px; align-items: flex-start; margin-top: 8px; }
.bw-photo-row img, .bw-photo-ph { width: 90px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid #ddd; }
.bw-photo-ph { display: flex; align-items: center; justify-content: center; font-size: 2rem; background: var(--surface-2); }
.bw-photo-row p { margin: 4px 0 8px; }
.bw-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.bw-chips button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--r-pill); padding: 7px 14px; font: inherit; cursor: pointer; }
.bw-chips button.on { background: #4f46e5; color: #fff; border-color: #4f46e5; }
/* Ergebnis */
.bw-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.bw-gen, .bw-out { display: flex; flex-wrap: wrap; gap: 8px; }
.bw-warn { margin: 0; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--r-m); padding: 6px 10px; font-size: .9rem; }
.bw-taler { font-size: .9rem; color: #4b4b7a; }
.bw-tabs { display: flex; gap: 6px; border-bottom: 2px solid #e5e7f5; }
.bw-tabs button { border: 0; background: none; padding: 8px 14px; font: inherit; font-weight: 700; color: #6b6f99; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.bw-tabs button.on { color: #3730a3; border-bottom-color: #4f46e5; }
.bw-opts { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: .9rem; }
.bw-opts select { padding: 6px 8px; margin-left: 4px; }
.bw-colors { display: inline-flex; gap: 6px; }
.bw-colors button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #ccc; cursor: pointer; }
.bw-colors button.on { box-shadow: 0 0 0 2px #111; }
.bw-preview { background: #e9eaf3; border-radius: var(--r-l); padding: 18px 10px; overflow-x: auto; }
/* A4-Seite */
.bw-page { --acc: #3730a3; width: 210mm; min-height: 297mm; margin: 0 auto; background: #fff; color: #1f2333; box-shadow: 0 6px 24px rgba(0,0,0,.15); padding: 18mm 18mm 16mm 22mm; box-sizing: border-box; font: 10.5pt/1.5 Calibri, "Segoe UI", Arial, sans-serif; position: relative; }
.bw-page.klassisch { font-family: Cambria, Georgia, "Times New Roman", serif; }
.bw-head { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 8px; border-bottom: 2px solid var(--acc); margin-bottom: 18px; }
.bw-head > div { flex: 1; }
.bw-photo { width: 30mm; height: 40mm; object-fit: cover; border-radius: 3px; order: 2; }
.bw-name { font-size: 22pt; font-weight: 700; color: var(--acc); line-height: 1.15; }
.bw-page.klassisch .bw-name { font-weight: 600; letter-spacing: .5px; }
.bw-contact { font-size: 9pt; color: #555; margin-top: 4px; }
.bw-contact .dot { margin: 0 6px; color: #aaa; }
.bw-rec { margin: 8mm 0 6mm; min-height: 22mm; }
.bw-date { text-align: right; margin-bottom: 8mm; }
.bw-subj { font-weight: 700; }
.bw-ref { font-size: 9.5pt; color: #555; }
.bw-sal { margin-top: 6mm; }
.bw-par { text-align: justify; margin: 0 0 3.5mm; hyphens: auto; }
.bw-close { margin-top: 5mm; }
.bw-sign { margin-top: 12mm; }
.bw-att { margin-top: 8mm; font-size: 9.5pt; }
.bw-doc-title { font-size: 15pt; color: var(--acc); margin: 0 0 8px; }
.bw-sec h3 { font-size: 10.5pt; text-transform: uppercase; letter-spacing: .8px; color: var(--acc); border-bottom: 1px solid #ccc; padding-bottom: 2px; margin: 14px 0 8px; }
.bw-row { display: grid; grid-template-columns: 38mm 1fr; gap: 6mm; margin-bottom: 8px; break-inside: avoid; }
.bw-when { color: #555; font-size: 9.5pt; padding-top: 1px; }
.bw-role { font-weight: 700; }
.bw-org { color: #555; font-size: 9.5pt; }
.bw-what ul { margin: 4px 0 0; padding-left: 16px; }
.bw-what li { margin-bottom: 2px; }
.bw-note { font-size: 9.5pt; }
.bw-sum { margin: 0; }
.bw-date-sign { margin-top: 12mm; }
.bw-date-sign .bw-sign { display: inline-block; margin-top: 8mm; }
.bw-empty { margin: 30mm 0; text-align: center; color: #888; font-size: 12pt; }
/* bearbeitbar + ✨ */
.ed { outline: none; border-radius: 3px; transition: background .15s; }
.ed:hover { background: #f5f5ff; }
.ed:focus { background: #eef2ff; box-shadow: 0 0 0 2px #c7d2fe; }
.ed:empty::before { content: "…"; color: #bbb; }
.bw-par-wrap, .bw-subj-wrap { position: relative; }
.bw-ai { position: absolute; right: -14mm; top: 0; width: 30px; height: 30px; border-radius: 50%; border: 1px solid #c7d2fe; background: #fff; cursor: pointer; font-size: 15px; opacity: .35; transition: opacity .15s; }
.bw-par-wrap:hover .bw-ai, .bw-subj-wrap:hover .bw-ai, .bw-ai:focus { opacity: 1; }
@media (max-width: 900px) { .bw-ai { right: -2mm; top: -6mm; opacity: .8; } }
.bw-menu { position: absolute; z-index: 60; background: #fff; border: 1px solid #c7d2fe; border-radius: var(--r-m); box-shadow: 0 10px 30px rgba(30,27,75,.2); padding: 8px; width: 270px; display: flex; flex-direction: column; gap: 4px; }
.bw-menu > button { text-align: left; border: 0; background: #f6f6ff; border-radius: 8px; padding: 7px 10px; font: inherit; cursor: pointer; }
.bw-menu > button:hover { background: #e0e7ff; }
.bw-menu form { display: flex; gap: 4px; margin-top: 4px; }
.bw-menu input { flex: 1; font: inherit; font-size: .85rem; padding: 6px 8px; border: 1px solid #cfd2ec; border-radius: 8px; }
.bw-menu form button { border: 0; background: #4f46e5; color: #fff; border-radius: 8px; padding: 0 10px; cursor: pointer; }
/* läuft / Hinweise */
.bw-busy { position: fixed; inset: 0; background: rgba(15,16,35,.45); z-index: 90; display: flex; align-items: center; justify-content: center; }
.bw-busy > div { background: #fff; border-radius: var(--r-l); padding: 22px 26px; text-align: center; max-width: 320px; }
.bw-spin { width: 38px; height: 38px; border: 4px solid #e0e7ff; border-top-color: #4f46e5; border-radius: 50%; margin: 0 auto 10px; animation: bwspin 1s linear infinite; }
@keyframes bwspin { to { transform: rotate(360deg); } }
.bw-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #1e1b4b; color: #fff; padding: 12px 18px; border-radius: var(--r-m); z-index: 95; max-width: min(560px, calc(100% - 32px)); box-shadow: 0 8px 26px rgba(0,0,0,.3); }
.bw-toast a { color: #fde68a; }
.print-only { display: none; }
/* Druck = PDF: nur die gewählte Seite */
@page { size: A4; margin: 0; }
@media print {
  body { background: #fff !important; }
  body > *:not(#bwPrint) { display: none !important; }
  .print-only { display: block !important; }
  .bw-page { box-shadow: none; margin: 0; width: 210mm; min-height: 297mm; }
  .bw-ai { display: none !important; }
}
.bw-busy[hidden], .bw-toast[hidden] { display: none; }
.bw-kiqo { display: block; width: 110px; height: auto; margin: 0 auto 6px; animation: kiqo-schweben 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .bw-kiqo { animation: none; } }
/* Handy: Umschalter ganze Seite / vergrößern */
.bw-fit { display: none; margin: 4px 0 8px; border: 1px solid #c7c9e8; background: #fff; color: #3730a3; border-radius: var(--r-pill); padding: 7px 14px; font-weight: 600; cursor: pointer; }
@media (max-width: 820px) { .bw-fit { display: inline-flex; } }

/* 26.10.2026: Schritte am Handy als wischbare Leiste, aktiver Schritt mit Verlauf, erledigte mit Häkchen-Farbe */
.bw-steps button { transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), background .2s, border-color .2s; }
.bw-steps button:hover { transform: translateY(-1px); }
.bw-steps button.on { background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 8px 18px -10px #4f46e5; animation: funPop .3s cubic-bezier(.34, 1.56, .64, 1); }
@media (max-width: 640px) {
  .bw-steps { position: relative; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .bw-steps::-webkit-scrollbar { display: none; }
  .bw-steps button { flex: 0 0 auto; min-height: 38px; scroll-snap-align: center; }
}
