/* ===== EnergieForum CRM - Hausverwalterwechsel (VVW) ===== */
.bsm-vvw { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #212934; }
.bsm-vvw, .bsm-vvw * { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.bsm-vvw input:not(.bsm-vvw-fileinput), .bsm-vvw select, .bsm-vvw textarea { color: #1f2733 !important; -webkit-text-fill-color: #1f2733 !important; opacity: 1 !important; }
.bsm-vvw input::placeholder, .bsm-vvw textarea::placeholder { color: #9aa0a6 !important; -webkit-text-fill-color: #9aa0a6 !important; }
.bsm-vvw input[readonly] { color: #1f2733 !important; -webkit-text-fill-color: #1f2733 !important; background: #f4f6f8 !important; }
.bsm-vvw h2 { font-size: 20px; font-weight: 600; margin: 0; color: #202833; }
.bsm-vvw h3 { font-size: 15px; font-weight: 600; color: #3a424f; margin: 22px 0 10px; }
.bsm-vvw-notice { background: #eafbef; border-left: 3px solid #2e8b57; padding: 10px 14px; margin-bottom: 16px; border-radius: 4px; }

.bsm-vvw-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }

.bsm-vvw-btn { background: #b22125; color: #fff; border: none; border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; }
.bsm-vvw-btn:hover { background: #97191d; }
.bsm-vvw-btn-ghost { background: #f1f3f5; color: #3a424f; border: none; border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; }

.bsm-vvw-tablewrap { overflow-x: auto; }
.bsm-vvw-table { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 760px; }
.bsm-vvw-table th { text-align: left; padding: 9px 12px; border-bottom: 2px solid #ececf0; color: #7c838d; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; white-space: nowrap; }
.bsm-vvw-table td { padding: 10px 12px; border-bottom: 1px solid #f0f1f4; vertical-align: middle; }
.bsm-vvw-num { text-align: center; }
.bsm-vvw-empty { color: #9aa0a6; font-style: italic; }

.bsm-vvw-badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; background: #eef0f3; color: #5b636d; white-space: nowrap; }
.bsm-vvw-st-pruefung { background: #eef0f3; color: #5b636d; }
.bsm-vvw-st-vertr_info { background: #e7f0fa; color: #2d6a9f; }
.bsm-vvw-st-vertr_kunde_tel { background: #e7f0fa; color: #2d6a9f; }
.bsm-vvw-st-bo_kd_mail { background: #fbf1e3; color: #b06a16; }
.bsm-vvw-st-bo_brief { background: #fbf1e3; color: #b06a16; }
.bsm-vvw-st-wiedervorlage { background: #f3e8fa; color: #7a559f; }
.bsm-vvw-st-abgeschlossen { background: #e6f6ec; color: #2e8b57; }

.bsm-vvw-actions { white-space: nowrap; }
.bsm-vvw-link { background: none; border: none; color: #2d6a9f; cursor: pointer; font-size: 13px; padding: 2px 6px; text-decoration: underline; }
.bsm-vvw-link:hover { color: #1d4a30; }

/* Overlay/Modal */
.bsm-vvw-overlay { position: fixed; inset: 0; background: rgba(20,28,38,.45); display: flex; align-items: center; justify-content: center; z-index: 2147483000 !important; }
.bsm-vvw-modal { background: #fff; border-radius: 14px; padding: 26px; width: 640px; max-width: 92vw; max-height: 88vh; overflow-y: auto; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.bsm-vvw-modal h3 { margin: 0 0 16px; font-size: 17px; font-weight: 600; color: #202833; }
.bsm-vvw-modal label { display: block; font-size: 12px; font-weight: 600; color: #6b7480; margin-bottom: 12px; }
.bsm-vvw-modal input, .bsm-vvw-modal select, .bsm-vvw-modal textarea { width: 100%; box-sizing: border-box; margin-top: 4px; padding: 8px 11px !important; border: 1px solid #cdd5e0 !important; border-radius: 7px !important; font-size: 13px !important; line-height: 1.3 !important; font-weight: 400; color: #1f2733 !important; -webkit-text-fill-color: #1f2733 !important; height: auto !important; min-height: 0 !important; background: #fff !important; opacity: 1 !important; }
.bsm-vvw-modal textarea { resize: vertical !important; min-height: 70px !important; }
.bsm-vvw-modal .bsm-vvw-grid { gap: 16px; }
.bsm-vvw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bsm-vvw-form label { display: block; font-size: 12px; font-weight: 600; color: #6b7480; }
.bsm-vvw-form input, .bsm-vvw-form select, .bsm-vvw-form textarea { width: 100%; box-sizing: border-box; margin-top: 4px; padding: 7px 10px !important; border: 1px solid #cdd5e0 !important; border-radius: 7px !important; font-size: 13px !important; line-height: 1.3 !important; font-weight: 400; color: #1f2733 !important; height: auto !important; min-height: 0 !important; background: #fff; }
.bsm-vvw-full { display: block; margin-top: 12px; }
.bsm-vvw-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

@media ( max-width: 600px ) {
	.bsm-vvw-grid { grid-template-columns: 1fr; }
}

/* Pipeline: Zähler */
.bsm-vvw-counts { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 22px; }
.bsm-vvw-count { background: #f6f7f9; border: 1px solid #ececf0; border-radius: 10px; padding: 10px 14px; min-width: 96px; }
.bsm-vvw-count-num { font-size: 22px; font-weight: 700; color: #202833; line-height: 1; }
.bsm-vvw-count-lbl { font-size: 11px; color: #7c838d; margin-top: 4px; }

/* Pipeline: Kanban */
.bsm-vvw-kanban { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding-bottom: 14px; }
.bsm-vvw-col { background: #f6f7f9; border-radius: 12px; padding: 10px; min-width: 0; }
.bsm-vvw-col-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; color: #3a424f; margin-bottom: 10px; padding: 2px 4px; }
.bsm-vvw-col-count { background: #fff; border-radius: 20px; padding: 1px 8px; font-size: 11px; color: #6b7480; }
.bsm-vvw-card { background: #fff; border: 1px solid #ececf0; border-radius: 9px; padding: 10px 11px; margin-bottom: 9px; cursor: pointer; transition: box-shadow .12s, border-color .12s; user-select: none; -webkit-user-select: none; }
.bsm-vvw-card * { pointer-events: none; }
.bsm-vvw-card:hover { box-shadow: 0 3px 10px rgba(30,40,55,.1); border-color: #d6dbe1; }
.bsm-vvw-card-title { font-size: 13px; font-weight: 600; color: #202833; margin-bottom: 4px; }
.bsm-vvw-card-meta { font-size: 11px; color: #7c838d; line-height: 1.5; }
.bsm-vvw-card-next { margin-top: 6px; font-size: 11px; color: #2d6a9f; }
.bsm-vvw-col-empty { font-size: 11px; color: #aeb4ba; font-style: italic; padding: 6px 4px; }

/* Ausklappbare Detailzeile */
.bsm-vvw-toggle { cursor: pointer; user-select: none; font-weight: 600; }
.bsm-vvw-caret { display: inline-block; width: 0; height: 0; margin-right: 8px; vertical-align: middle; border-left: 5px solid #9aa0a6; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .12s; }
.bsm-vvw-row.bsm-vvw-open .bsm-vvw-caret { transform: rotate( 90deg ); }
.bsm-vvw-detail-cell { background: #f8f9fb; padding: 18px 20px !important; }
.bsm-vvw-detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
.bsm-vvw-detail-edit h4, .bsm-vvw-detail-notes h4 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: #202833; }
.bsm-vvw-detail-edit label { display: block; font-size: 12px; font-weight: 600; color: #6b7480; }
.bsm-vvw-detail-edit input, .bsm-vvw-detail-edit select, .bsm-vvw-detail-edit textarea { width: 100%; box-sizing: border-box; margin-top: 4px; padding: 7px 10px !important; border: 1px solid #cdd5e0 !important; border-radius: 7px !important; font-size: 13px !important; line-height: 1.3 !important; font-weight: 400; color: #1f2733 !important; height: auto !important; min-height: 0 !important; background: #fff; }
.bsm-vvw-detail-edit textarea, .bsm-vvw-form textarea, .bsm-vvw-note-form textarea { resize: vertical !important; min-height: 60px !important; }
.bsm-vvw textarea[name="bemerkungen"], .bsm-vvw textarea[name="note_body"] { resize: vertical !important; min-height: 64px !important; height: 64px; overflow: auto !important; }
.bsm-vvw-detail-actions { display: flex; gap: 10px; margin-top: 14px; }
.bsm-vvw-btn-danger { background: #b22125; color: #fff; border: none; border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; }
.bsm-vvw-btn-danger:hover { background: #97191d; }
.bsm-vvw-pipe-table thead { display: none; }
.bsm-vvw-pipe-table .bsm-vvw-row { display: none !important; }
.bsm-vvw-detail-row { display: none; }
.bsm-vvw-detail-row.bsm-vvw-detail-open { display: table-row !important; }
.bsm-vvw-tabs { display: flex; gap: 4px; border-bottom: 2px solid #e2e6ea; margin: 8px 0 20px; flex-wrap: wrap; }
.bsm-vvw-tab { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; padding: 9px 16px; font-size: 14px; font-weight: 600; color: #6b7480; cursor: pointer; }
.bsm-vvw-tab:hover { color: #b22125; }
.bsm-vvw-tab-active { color: #b22125 !important; border-bottom-color: #b22125 !important; }
.bsm-vvw-tabpanel { display: none; }
.bsm-vvw-tabpanel-active { display: block; }
.bsm-vvw-btn-mail { background: #212934; color: #fff; border: none; border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; }
.bsm-vvw-btn-mail:hover { background: #0f151c; }

/* Notizen */
.bsm-vvw-note-form { margin-bottom: 14px; }
.bsm-vvw-note-form textarea { width: 100%; box-sizing: border-box; padding: 7px 10px !important; border: 1px solid #cdd5e0 !important; border-radius: 7px !important; font-size: 13px !important; line-height: 1.3 !important; margin-bottom: 8px; resize: vertical !important; background: #fff; }
.bsm-vvw-dropzone { position: relative; border: 1.5px dashed #cdd5e0; border-radius: 8px; background: #fafbfc; padding: 8px 12px; margin-bottom: 10px; cursor: pointer; transition: border-color .12s, background .12s; }
.bsm-vvw-dropzone.bsm-vvw-dragover { border-color: #b22125; background: #fbf3f3; }
.bsm-vvw-fileinput { position: absolute; inset: 0; opacity: 0 !important; width: 100%; height: 100%; cursor: pointer; }
.bsm-vvw-dropzone-inner { display: flex; flex-direction: row; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center; gap: 4px 8px; pointer-events: none; }
.bsm-vvw-drop-ico { width: 16px; height: 16px; border: 2px solid #b22125; border-radius: 50%; position: relative; flex: 0 0 auto; }
.bsm-vvw-drop-ico::before, .bsm-vvw-drop-ico::after { content: ''; position: absolute; background: #b22125; }
.bsm-vvw-drop-ico::before { width: 2px; height: 8px; left: 6px; top: 2px; }
.bsm-vvw-drop-ico::after { width: 8px; height: 2px; left: 3px; top: 5px; }
.bsm-vvw-drop-text { font-size: 12px; color: #3a424f; }
.bsm-vvw-drop-link { color: #b22125; font-weight: 600; text-decoration: underline; }
.bsm-vvw-drop-hint { font-size: 10px; color: #9aa0a6; flex-basis: 100%; }
.bsm-vvw-droplist { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.bsm-vvw-dropitem { font-size: 12px; color: #2b3340; background: #fff; border: 1px solid #e6eaf0; border-radius: 6px; padding: 4px 9px; }
.bsm-vvw-note-list { max-height: 360px; overflow-y: auto; }
.bsm-vvw-note { background: #fff; border: 1px solid #ececf0; border-left: 3px solid #b22125; border-radius: 8px; padding: 9px 12px; margin-bottom: 8px; }
.bsm-vvw-note-meta { font-size: 11px; color: #9aa0a6; margin-bottom: 3px; }
.bsm-vvw-note-body { font-size: 13px; color: #2b3340; line-height: 1.45; }
.bsm-vvw-note-empty { font-size: 12px; color: #aeb4ba; font-style: italic; }
.bsm-vvw-note-files { margin-top: 7px; display: flex; flex-direction: column; gap: 4px; }
.bsm-vvw-note-file-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #2d6a9f; text-decoration: none; }
.bsm-vvw-note-file-link:hover { text-decoration: underline; }
.bsm-vvw-file-ico { display: inline-block; width: 12px; height: 14px; background: linear-gradient( #d6dbe1, #d6dbe1 ) no-repeat; border-radius: 2px; position: relative; flex: 0 0 auto; border: 1px solid #b8bfc7; }

@media ( max-width: 760px ) {
	.bsm-vvw-detail-grid { grid-template-columns: 1fr; }
}
