:root{
  --bg:#e9edf2;
  --surface:#fff;
  --surface-soft:#f7f8fa;
  --navy:#202b40;
  --navy-dark:#131c2b;
  --navy-light:#34445f;
  --text:#182230;
  --muted:#667085;
  --border:#cfd5de;
  --border-dark:#aeb7c5;
  --primary:#236b9f;
  --primary-dark:#184c73;
  --success:#16794b;
  --warning:#9a6700;
  --danger:#b42318;
  --shadow:0 2px 7px rgba(16,24,40,.10);
  font-family:Arial,"Segoe UI",sans-serif;
  color-scheme:light;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font-size:13px;line-height:1.4}
a{color:#175cd3;text-decoration:none}
a:hover{text-decoration:underline}
button,input,textarea,select{font:inherit}
button{color:inherit}
.app-shell{min-height:100vh}
.app-header{position:sticky;top:0;z-index:50;background:var(--navy);color:#fff;border-bottom:2px solid #111827;box-shadow:0 2px 8px rgba(0,0,0,.22)}
.header-main{min-height:68px;padding:8px 14px;display:flex;align-items:center;gap:20px;background:linear-gradient(180deg,var(--navy),#1b2639)}
.brand-block{display:flex;align-items:center;gap:10px;color:#fff;min-width:260px}
.brand-block:hover{text-decoration:none}
.brand-block>span:last-child{display:flex;flex-direction:column}
.brand-block strong{font-size:17px;line-height:1.2}
.brand-block small{font-size:11px;color:#c7d0de;margin-top:2px}
.brand-symbol{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;background:#31a8a0;border:2px solid #8ae0d9;border-radius:50%;font-weight:900;letter-spacing:-1px;color:#fff;box-shadow:inset 0 0 0 3px rgba(0,0,0,.15)}
.header-metrics{display:flex;gap:0;margin-left:auto;border:1px solid rgba(255,255,255,.15)}
.header-metrics>span{min-width:110px;padding:6px 12px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px;border-left:1px solid rgba(255,255,255,.15)}
.header-metrics>span:first-child{border-left:0}
.header-metrics small{color:#c7d0de;font-size:10px;text-transform:uppercase;letter-spacing:.04em}
.header-metrics strong{font-size:18px}
.header-user{display:flex;align-items:center;gap:14px;margin-left:10px}
.header-user>span{display:flex;flex-direction:column;text-align:right}
.header-user small{font-size:11px;color:#c7d0de}
.header-user a{color:#fff;font-weight:700;border-left:1px solid rgba(255,255,255,.25);padding-left:14px}
.header-navigation{display:flex;align-items:center;gap:14px;padding:0 14px;background:var(--navy-dark);border-top:1px solid rgba(255,255,255,.08)}
.main-nav{display:flex;align-items:stretch;overflow-x:auto;flex:1}
.main-nav a{color:#d7deea;padding:10px 12px;border-left:1px solid rgba(255,255,255,.07);font-weight:700;white-space:nowrap;font-size:12px}
.main-nav a:last-child{border-right:1px solid rgba(255,255,255,.07)}
.main-nav a:hover,.main-nav a.active{background:#35445d;color:#fff;text-decoration:none;box-shadow:inset 0 -3px 0 #55c6bd}
.global-search{display:flex;align-items:center;min-width:330px;max-width:500px;padding:5px 0}
.global-search input{width:100%;height:29px;border:1px solid #68768c;border-right:0;background:#fff;color:#111827;padding:5px 9px;border-radius:2px 0 0 2px}
.global-search button{height:29px;border:1px solid #68768c;background:#d8dee7;color:#182230;padding:4px 10px;font-weight:700;border-radius:0 2px 2px 0;cursor:pointer}
.menu-button{display:none;border:1px solid rgba(255,255,255,.35);background:transparent;color:#fff;padding:5px 8px;border-radius:2px;font-size:18px}
.main{min-width:0}
.content{max-width:1800px;margin:0 auto;padding:10px 12px 28px}
.page-heading{min-height:34px;margin:0 0 10px;background:var(--navy);color:#fff;border:1px solid #111827;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 8px;box-shadow:var(--shadow)}
.page-heading h1{font-size:14px;margin:0;font-weight:800}
.page-heading-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.page-heading .btn{padding:5px 9px;border-color:#8e99aa;background:#fff;color:#182230}
.card,.tanss-panel{background:var(--surface);border:1px solid var(--border-dark);border-radius:2px;box-shadow:var(--shadow);margin-bottom:10px}
.card{padding:12px}
.card h2{margin:0 0 10px;font-size:14px;color:#26364f}
.panel-title{min-height:29px;background:var(--navy);color:#fff;border-bottom:1px solid #111827;padding:5px 7px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-weight:800}
.panel-title small{font-weight:400;color:#d8dee8}
.panel-title .badge{border:1px solid rgba(255,255,255,.45)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid #aeb7c5;background:#f9fafb;color:#182230;padding:6px 10px;border-radius:2px;font-weight:700;cursor:pointer;text-decoration:none;line-height:1.2}
.btn:hover{background:#e8ecf1;text-decoration:none}
.btn-primary{background:#276f9f;border-color:#174d73;color:#fff}
.btn-primary:hover{background:#1d5c86}
.btn-small{padding:3px 7px;font-size:11px}
.btn-block{width:100%}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px}
.form-field{display:flex;flex-direction:column;gap:4px;margin-bottom:8px}
.form-field label{font-weight:700;color:#344054}
.form-field input,.form-field textarea,.form-field select,.toolbar input,.toolbar select,.inline-form input,.reply-options select{width:100%;border:1px solid #aeb7c5;border-radius:2px;padding:7px 8px;background:#fff;color:var(--text)}
.form-field textarea{resize:vertical}
.form-field input:focus,.form-field textarea:focus,.form-field select:focus,.global-search input:focus{outline:2px solid rgba(35,107,159,.18);border-color:#236b9f}
.form-field small,.form-hint{color:var(--muted)}
.field-wide{grid-column:1/-1}
.checkbox{display:flex!important;flex-direction:row!important;align-items:center;gap:7px;font-weight:600!important;margin:0}
.checkbox input{width:auto}
.form-actions,.page-actions{display:flex;gap:7px;margin-top:10px;flex-wrap:wrap}
.toolbar{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:8px;background:#f7f8fa;border:1px solid var(--border-dark);padding:7px}
.toolbar form{display:flex;gap:6px;flex:1;max-width:1000px}
.toolbar input{min-width:280px}
.table-wrap{overflow:auto;background:var(--surface);border:1px solid var(--border-dark);border-radius:2px;box-shadow:var(--shadow);margin-bottom:10px}
table{width:100%;border-collapse:collapse;white-space:nowrap}
th,td{text-align:left;padding:7px 8px;border-bottom:1px solid #d9dee6;border-right:1px solid #e2e6ec;vertical-align:top}
th:last-child,td:last-child{border-right:0}
th{background:var(--navy);color:#fff;font-size:11px;font-weight:800;letter-spacing:.01em}
tbody tr:nth-child(even){background:#f7f8fa}
tbody tr:hover{background:#eaf2f8}
tfoot td{background:#f1f3f6;font-weight:700}
.actions{display:flex;gap:8px}
.actions form{display:inline}
.link-danger{border:0;background:none;color:var(--danger);padding:0;cursor:pointer}
.alert{padding:8px 10px;margin-bottom:9px;border:1px solid transparent;border-radius:2px}
.alert-success{background:#ecfdf3;border-color:#75c99d;color:#067647}
.alert-danger{background:#fef3f2;border-color:#f2a6a1;color:#9f1c12}
.alert-warning{background:#fffaeb;border-color:#e6c566;color:#7a4b00}
.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:10px}
.stat-card{background:var(--surface);border:1px solid var(--border-dark);border-left:5px solid #2e6f9c;padding:10px 12px;box-shadow:var(--shadow);display:flex;justify-content:space-between;align-items:center;color:var(--text)}
.stat-card:hover{text-decoration:none;background:#f8fafc}
.stat-card span{color:#475467;font-weight:700}
.stat-card strong{font-size:23px;color:#20304a}
.dashboard-grid,.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.badge{display:inline-block;padding:2px 6px;border-radius:2px;background:#eef2f6;font-size:10px;font-weight:800;text-transform:capitalize;vertical-align:middle}
.badge-critical,.badge-urgent,.badge-overdue{background:#fee4e2;color:#b42318}
.badge-high,.badge-open,.badge-new{background:#fff0c7;color:#7a4500}
.badge-normal,.badge-in_progress,.badge-sent{background:#dcecff;color:#175cd3}
.badge-low,.badge-resolved,.badge-closed,.badge-paid,.badge-accepted,.badge-active,.badge-done{background:#d8f6e3;color:#067647}
.badge-waiting_customer,.badge-waiting_internal,.badge-part_paid{background:#eee4ff;color:#6941c6}
.badge-cancelled,.badge-rejected,.badge-expired,.badge-inactive{background:#eaecf0;color:#475467}
.detail-list{display:grid;grid-template-columns:145px 1fr;gap:7px 12px;margin:0}
.detail-list dt{font-weight:700;color:#475467}
.detail-list dd{margin:0}
.prose{line-height:1.55;white-space:normal}
.ticket-data-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:#fff}
.ticket-data-grid>div{min-height:48px;padding:7px 9px;border-right:1px solid #e2e6ec;border-bottom:1px solid #d9dee6;display:flex;flex-direction:column;gap:3px}
.ticket-data-grid>div:nth-child(4n){border-right:0}
.ticket-data-grid span{color:#475467;font-size:11px;font-weight:700}
.ticket-data-grid strong{font-size:12px;overflow-wrap:anywhere}
.ticket-data-grid .ticket-subject,.ticket-data-grid .ticket-description{grid-column:1/-1;border-right:0}
.ticket-data-grid .ticket-description{min-height:70px}
.ticket-data-grid .ticket-description>div{white-space:normal;line-height:1.55}
.ticket-workspace{display:grid;grid-template-columns:1fr 1.2fr 1.2fr;border:1px solid var(--border-dark);background:#fff;margin-bottom:10px;box-shadow:var(--shadow)}
.workspace-box{min-height:116px;border-right:1px solid #cfd5de;display:flex;flex-direction:column}
.workspace-box:last-child{border-right:0}
.workspace-title{background:var(--navy);color:#fff;font-weight:800;padding:5px 7px;border-bottom:1px solid #111827}
.workspace-box>a,.workspace-empty{padding:5px 8px;border-bottom:1px solid #edf0f4;color:#344054}
.workspace-box>a:hover{background:#eef4f8;text-decoration:none}
.workspace-empty{color:#98a2b3}
.conversation{display:flex;flex-direction:column;gap:0;background:#fff}
.message{background:#fff;border-bottom:1px solid #cfd5de;padding:0}
.message:last-child{border-bottom:0}
.message.incoming{border-left:4px solid #2f80b7}
.message.outgoing{border-left:4px solid #2f9b66}
.message.internal{border-left:4px solid #d88713;background:#fffaf0}
.message header{display:flex;align-items:center;gap:8px;padding:6px 8px;background:#f3f5f8;border-bottom:1px solid #d9dee6}
.message header strong{font-size:12px}
.message header span{color:#667085;margin-left:auto;font-size:11px}
.message header em{font-style:normal;background:#dfe6ef;color:#344054;padding:2px 5px;border-radius:2px;font-size:10px;font-weight:700}
.message header .internal-label{background:#fff0c2;color:#7a2e0e}
.message-body{padding:8px 10px;overflow-wrap:anywhere}
.message-text{white-space:normal;line-height:1.55}
.empty-state{padding:18px;color:#667085;text-align:center}
.reply-form{overflow:hidden}
.reply-editor-wrap{padding:9px}
.reply-options{display:flex;align-items:center;gap:10px;padding:8px 9px;border-top:1px solid #cfd5de;background:#f3f5f8;flex-wrap:wrap}
.reply-options select{max-width:340px;margin-left:auto}
.reply-form>.form-hint{display:block;padding:0 9px 9px;background:#f3f5f8}
.file-button{display:inline-flex;align-items:center;border:1px solid #aeb7c5;background:#fff;padding:5px 8px;border-radius:2px;font-weight:700;cursor:pointer}
.file-button input{display:none}
.rich-editor{border:1px solid #aeb7c5;background:#fff}
.editor-toolbar{display:flex;gap:2px;flex-wrap:wrap;padding:4px;background:#e9edf2;border-bottom:1px solid #aeb7c5}
.editor-toolbar button{border:1px solid #aeb7c5;background:#fff;padding:4px 7px;min-width:28px;border-radius:2px;cursor:pointer;font-size:11px}
.editor-toolbar button:hover{background:#dbe4ec}
.editor-content{min-height:150px;padding:10px;outline:none;line-height:1.55;overflow-wrap:anywhere;background:#fff}
.editor-content:empty:before{content:attr(data-placeholder);color:#98a2b3;pointer-events:none}
.editor-content blockquote{border-left:3px solid #98a2b3;margin:8px 0;padding-left:10px;color:#475467}
.editor-content img{max-width:100%;height:auto}
.editor-content table{white-space:normal}
.email-html-container{border:1px solid #d0d5dd;background:#fff}
.email-privacy-bar{padding:6px 8px;background:#fffaeb;border-bottom:1px solid #e8c96d;color:#7a4b00;font-size:11px}
.email-frame{display:block;width:100%;height:120px;border:0;background:#fff}
.document-head{display:flex;justify-content:space-between;gap:30px}
.document-head>div:last-child{text-align:right}
.tabs{display:flex;gap:0;margin-bottom:10px;border:1px solid var(--border-dark);background:#fff;overflow:auto}
.tabs a{padding:7px 10px;color:#475467;font-weight:700;white-space:nowrap;border-right:1px solid #d0d5dd}
.tabs a.active{color:#fff;background:var(--navy)}
.search-results{list-style:none;padding:0;margin:0}
.search-results li+li{border-top:1px solid var(--border)}
.search-results a{display:flex;justify-content:space-between;gap:20px;padding:8px 0;color:var(--text)}
.search-results span{color:var(--muted)}
code{white-space:normal;word-break:break-all;background:#eef1f5;padding:2px 4px;border-radius:2px}
.inline-form{display:flex;gap:6px;flex-wrap:wrap}
.inline-form input{width:auto;min-width:150px}
.auth-shell,.install-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(145deg,#121b2a,#2a405f)}
.auth-card,.install-card{width:min(440px,100%);background:#fff;border:1px solid #0c1420;border-radius:3px;padding:24px;box-shadow:0 25px 70px rgba(0,0,0,.35)}
.install-card{width:min(950px,100%)}
.auth-brand{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:900;margin-bottom:20px;color:#202b40}
.auth-card h1,.install-card h1{margin-top:0;font-size:20px}
.requirements{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;background:#f8fafc;border:1px solid var(--border);padding:10px;margin:14px 0}
.req-ok{color:var(--success);font-weight:900}.req-bad{color:var(--danger);font-weight:900}
.install-card h2{margin-top:22px;border-bottom:3px solid var(--navy);padding-bottom:5px;font-size:15px}
@media(max-width:1200px){
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .ticket-data-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ticket-data-grid>div:nth-child(4n){border-right:1px solid #e2e6ec}
  .ticket-data-grid>div:nth-child(2n){border-right:0}
  .dashboard-grid,.detail-grid{grid-template-columns:1fr}
  .header-metrics{display:none}
}
@media(max-width:900px){
  .menu-button{display:block}
  .brand-block{min-width:0}
  .header-navigation{display:none;position:absolute;left:0;right:0;top:68px;flex-direction:column;align-items:stretch;padding:6px 10px 10px}
  .header-navigation.open{display:flex}
  .main-nav{flex-direction:column;max-height:60vh;overflow:auto}
  .main-nav a{border:0;border-bottom:1px solid rgba(255,255,255,.08)}
  .global-search{min-width:0;max-width:none;width:100%}
  .ticket-workspace{grid-template-columns:1fr}
  .workspace-box{border-right:0;border-bottom:1px solid #cfd5de}
  .workspace-box:last-child{border-bottom:0}
  .reply-options select{margin-left:0;max-width:none}
}
@media(max-width:680px){
  .content{padding:7px}
  .header-main{gap:9px}
  .header-user>span{display:none}
  .header-user a{border-left:0;padding-left:0}
  .brand-block small{display:none}
  .page-heading{align-items:stretch;flex-direction:column}
  .page-heading-actions{width:100%}
  .page-heading-actions .btn{flex:1}
  .form-grid{grid-template-columns:1fr}
  .field-wide{grid-column:auto}
  .stat-grid{grid-template-columns:1fr}
  .ticket-data-grid{grid-template-columns:1fr}
  .ticket-data-grid>div{border-right:0!important}
  .toolbar,.toolbar form,.reply-options,.document-head{flex-direction:column;align-items:stretch}
  .toolbar input{min-width:0}
  .requirements{grid-template-columns:1fr}
  .detail-list{grid-template-columns:105px 1fr}
  .message header{flex-wrap:wrap}
  .message header span{width:100%;margin-left:0}
}

/* SN CRM 1.2.0: Ticket-Board, Tags, Projekte und Leistungen */
.ticket-tags{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
.ticket-tag{display:inline-flex;align-items:center;max-width:180px;padding:3px 8px;border-radius:999px;font-size:10px;font-weight:800;line-height:1.3;box-shadow:inset 0 0 0 1px rgba(255,255,255,.2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tag-selector{display:flex;flex-wrap:wrap;gap:7px;padding:8px;border:1px solid #cfd5de;background:#f8fafc}
.tag-selector label{cursor:pointer}
.tag-selector input{position:absolute;opacity:0;pointer-events:none}
.tag-selector span{display:inline-flex;padding:5px 9px;border:2px solid var(--tag-color);border-radius:999px;background:#fff;font-weight:800;color:#344054}
.tag-selector input:checked+span{background:var(--tag-color);color:#fff;box-shadow:0 0 0 2px rgba(23,92,211,.12)}
.color-pill{--pill-color:#667085;display:inline-flex;align-items:center;gap:6px;padding:3px 8px;border-radius:999px;background:color-mix(in srgb,var(--pill-color) 18%,white);border:1px solid color-mix(in srgb,var(--pill-color) 55%,white);color:#172033;font-weight:800}
.color-pill:before{content:"";width:8px;height:8px;border-radius:50%;background:var(--pill-color);flex:0 0 auto}
.color-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px}
.ticket-customer-trigger{cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px}
.ticket-customer-trigger:hover{color:#175cd3}
.ticket-description-text{line-height:1.55;overflow:hidden}
.ticket-description-text.is-collapsed{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;max-height:4.65em}
.description-toggle{align-self:flex-start;margin-top:5px;border:0;background:none;color:#175cd3;font-weight:800;padding:0;cursor:pointer}
.ticket-toolbar{align-items:stretch}
.ticket-toolbar form{max-width:none}
.ticket-toolbar select{min-width:150px}
.view-switch{display:flex;gap:5px;margin-left:auto}
.ticket-board{display:flex;gap:10px;overflow-x:auto;align-items:flex-start;padding:2px 1px 16px;min-height:520px}
.board-column{flex:0 0 310px;background:#e9edf2;border:1px solid #bac3cf;border-radius:4px;overflow:hidden;box-shadow:var(--shadow);transition:.15s ease}
.board-column.drag-over{outline:3px solid #2f80b7;transform:translateY(-2px)}
.board-column>header{display:flex;justify-content:space-between;align-items:center;padding:9px 10px;background:var(--navy);color:#fff;border-top:5px solid var(--column-color);font-weight:900}
.board-column>header strong{display:grid;place-items:center;min-width:24px;height:24px;padding:0 6px;border-radius:999px;background:rgba(255,255,255,.18)}
.board-cards{display:flex;flex-direction:column;gap:8px;padding:8px;min-height:120px}
.ticket-card{background:#fff;border:1px solid #c8d0da;border-radius:4px;padding:9px;box-shadow:0 2px 5px rgba(15,23,42,.1);cursor:grab;transition:.15s ease}
.ticket-card:hover{border-color:#7f8da1;box-shadow:0 4px 12px rgba(15,23,42,.14)}
.ticket-card.is-dragging{opacity:.45;transform:rotate(1deg)}
.ticket-card-top,.ticket-card-footer{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.ticket-card-top>a{font-weight:900;font-size:11px}
.ticket-card h3{font-size:13px;margin:7px 0 5px;line-height:1.35}
.ticket-card .card-description{margin:0 0 8px;color:#475467;font-size:11px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.ticket-card-meta{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:6px 0;border-top:1px solid #edf0f4;border-bottom:1px solid #edf0f4;color:#667085;font-size:10px}
.ticket-card-meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.card-project{margin:7px 0;font-size:10px;font-weight:800;color:#344054;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ticket-card-footer{margin-top:7px;align-items:center}
.ticket-card-footer .ticket-tags{max-width:72%}
.board-empty{border:2px dashed #aeb7c5;border-radius:4px;padding:22px 10px;text-align:center;color:#667085;font-size:11px}
.email-rendered-html{padding:14px;line-height:1.5;overflow:auto;background:#fff;color:#182230}
.email-rendered-html img{max-width:100%;height:auto}
.email-rendered-html img:not([src]){display:inline-block;min-width:180px;min-height:32px;border:1px dashed #98a2b3;background:#f2f4f7}
.email-rendered-html table{max-width:100%;white-space:normal;border-collapse:collapse}
.email-rendered-html pre{white-space:pre-wrap}
.service-entry-form{overflow:hidden}
.service-form-grid{padding:10px}
.service-calculation{padding:9px 11px;background:#eef6ff;border-top:1px solid #b8d5f0;color:#174b75;font-weight:800}
.service-entry-form .form-actions{padding:9px 11px;background:#f3f5f8;border-top:1px solid #cfd5de}
.service-table{margin:0;border:0;box-shadow:none;border-radius:0}
.service-invoice-action{padding:10px;border-top:1px solid #cfd5de;background:#f8fafc;text-align:right}
.settings-color{display:inline-block;width:28px;height:18px;border-radius:3px;border:1px solid rgba(0,0,0,.2)}
.customer-picker-dialog{width:min(680px,calc(100vw - 28px));padding:0;border:1px solid #667085;border-radius:5px;box-shadow:0 24px 80px rgba(15,23,42,.38)}
.customer-picker-dialog::backdrop{background:rgba(15,23,42,.58)}
.dialog-head{display:flex;justify-content:space-between;align-items:center;padding:9px 12px;background:var(--navy);color:#fff}
.dialog-head button{border:0;background:transparent;color:#fff;font-size:22px;cursor:pointer}
.dialog-body{padding:12px}
.dialog-body>input{width:100%;margin-bottom:9px}
.customer-search-results{max-height:360px;overflow:auto;border:1px solid #d0d5dd}
.customer-result{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:3px;padding:9px 10px;border:0;border-bottom:1px solid #e4e7ec;background:#fff;text-align:left;cursor:pointer}
.customer-result:hover{background:#eef6ff}
.customer-result span{font-size:11px;color:#667085}
.customer-picker-dialog>form:last-child{display:flex;justify-content:flex-end;padding:10px 12px;border-top:1px solid #d0d5dd;background:#f8fafc}
.search-loading{padding:15px;text-align:center;color:#667085}
.badge-new{background:#fff0c7;color:#7a4500;border:1px solid #f1c453}
.badge-open{background:#dcecff;color:#175cd3;border:1px solid #8dbbf6}
.badge-in_progress{background:#e8ddff;color:#5925dc;border:1px solid #b9a1f5}
.badge-waiting_customer{background:#ffe8cc;color:#9a3412;border:1px solid #f7b66c}
.badge-waiting_internal{background:#fce7f6;color:#9d174d;border:1px solid #e9a2cc}
.badge-resolved{background:#d8f6e3;color:#067647;border:1px solid #77ca98}
.badge-closed{background:#dce3ea;color:#344054;border:1px solid #aab5c3}
.badge-cancelled{background:#fee4e2;color:#b42318;border:1px solid #f0a09a}
.badge-low{background:#e6f4ea;color:#1e6b3a;border:1px solid #9bc9aa}
.badge-normal{background:#dcecff;color:#175cd3;border:1px solid #8dbbf6}
.badge-high{background:#fff0c7;color:#7a4500;border:1px solid #f1c453}
.badge-urgent{background:#ffe2cc;color:#b54708;border:1px solid #f3a56f}
.badge-critical{background:#ffd4d2;color:#a50000;border:1px solid #e66f68;animation:critical-pulse 2s infinite}
@keyframes critical-pulse{50%{box-shadow:0 0 0 3px rgba(214,45,32,.12)}}
@media(max-width:900px){.ticket-board{min-height:420px}.board-column{flex-basis:285px}.view-switch{margin-left:0}.ticket-toolbar form{flex-wrap:wrap}}

/* Ticket-E-Mail-Antworten und isolierte HTML-Darstellung */
.message-reply-button{border:1px solid #9aa7b8;background:#fff;color:#25364d;padding:3px 8px;border-radius:2px;font-size:11px;font-weight:800;cursor:pointer;white-space:nowrap}
.message-reply-button:hover{background:#e7eef6;border-color:#6f8095}
.conversation>.email-reply-composer{margin:0;border-left:4px solid #2f80b7;border-right:0;border-bottom:1px solid #cfd5de;border-top:0;box-shadow:inset 0 1px 0 #fff}
.email-reply-composer .panel-title{background:#26364f}
.email-reply-composer.is-open{animation:emailComposerOpen .14s ease-out}
.composer-close{margin-left:auto;border:0;background:transparent;color:#fff;font-size:20px;line-height:1;cursor:pointer;padding:0 4px}
.composer-close:hover{color:#dbeafe}
.email-frame{min-height:120px;max-height:1600px}
@keyframes emailComposerOpen{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}


/* 1.2.2: bedarfsweise Eingabemasken */
.workspace-action{display:block;width:100%;padding:5px 7px;border:0;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}
.workspace-action:hover{background:#eef2f6;color:#102a43}
.note-compose-form[hidden]{display:none!important}
.note-compose-form.is-open{display:block}
.service-dialog{width:min(760px,calc(100vw - 28px));max-height:calc(100vh - 32px);padding:0;border:1px solid #667085;border-radius:5px;background:#fff;box-shadow:0 24px 80px rgba(15,23,42,.38);overflow:auto}
.service-dialog::backdrop{background:rgba(15,23,42,.58)}
.service-dialog .dialog-body{padding:12px}
.service-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:8px;padding:10px 12px;border-top:1px solid #d0d5dd;background:#f8fafc;position:sticky;bottom:0}
.service-dialog .service-calculation{margin-top:10px}
.email-frame{background:#fff;color-scheme:light}
