@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');
:root{--red:#da291c;--yellow:#ffbc0d;--ink:#242424;--muted:#6f6b65;--line:#e9e5de;--paper:#f7f6f2;--white:#fff;--green:#22754b;--blue:#2878b5;--orange:#bd5d19;--shadow:0 12px 32px rgba(35,31,27,.06)}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:14px/1.5 'DM Sans',sans-serif}h1,h2,h3,p{margin-top:0}h1,h2,h3,.brand{font-family:Manrope,sans-serif}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}.app-shell{display:grid;grid-template-columns:240px 1fr;min-height:100vh}.sidebar{position:fixed;width:240px;height:100vh;background:#25221f;color:#fff;padding:27px 17px;display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:13px;font-size:17px;font-weight:800;padding:0 10px 29px}.brand small,.login-brand small{display:block;font:11px 'DM Sans';color:#aaa39c;letter-spacing:.04em}.arches{display:grid;place-items:center;width:36px;height:36px;background:var(--red);border-radius:9px}.arches img{width:24px;height:auto;margin-left:2px}.sidebar nav{display:grid;gap:4px}.sidebar nav a{padding:11px 13px;border-radius:9px;color:#c9c5c1;font-weight:600}.sidebar nav a span{margin-left:11px}.sidebar nav a.active,.sidebar nav a:hover{background:#3a3632;color:#fff}.sidebar nav a.active{box-shadow:inset 3px 0 var(--yellow)}.nav-label{color:#77716c;text-transform:uppercase;font-size:10px;letter-spacing:.15em;padding:23px 13px 7px}.sidebar-user{margin-top:auto;border-top:1px solid #45403b;padding:18px 5px 0;display:flex;align-items:center;gap:10px}.sidebar-user-link{display:flex;align-items:center;gap:10px;min-width:0}.sidebar-user-link:hover strong{text-decoration:underline}.avatar{width:35px;height:35px;border-radius:50%;background:var(--yellow);display:inline-grid;place-items:center;font-weight:800;color:#3b2b00;flex:0 0 auto}.sidebar-user strong,.sidebar-user small{display:block;font-size:12px}.sidebar-user small{color:#918b85}.sidebar-user form{margin-left:auto}.sidebar-user button{color:#aaa;background:none;border:0;font-size:20px;cursor:pointer}main{grid-column:2}.topbar{height:94px;background:#fff;border-bottom:1px solid var(--line);padding:20px 38px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:4}.topbar h1{font-size:23px;margin:2px 0}.eyebrow{text-transform:uppercase;letter-spacing:.14em;color:var(--red);font-size:10px;font-weight:700}.live{background:#edf8f1;color:var(--green);padding:8px 13px;border-radius:20px;font-weight:600;font-size:12px}.live i{display:inline-block;width:7px;height:7px;background:#31a66b;border-radius:50%;margin-right:7px}.menu{display:none}.content{padding:30px 38px 60px;max-width:1500px;margin:auto}.intro{display:flex;justify-content:space-between;color:var(--muted);margin-bottom:20px}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.stat{background:#fff;border:1px solid var(--line);border-radius:13px;padding:21px;display:flex;gap:16px;align-items:center;box-shadow:var(--shadow);transition:.2s}.stat:hover{transform:translateY(-2px);border-color:#d8d1c7}.stat-icon{width:43px;height:43px;border-radius:10px;display:grid;place-items:center;font-size:20px}.stat.yellow .stat-icon{background:#fff6d9;color:#a46e00}.stat.blue .stat-icon{background:#e7f3fb;color:var(--blue)}.stat.orange .stat-icon{background:#fff0e3;color:var(--orange)}.stat.green .stat-icon{background:#e8f6ee;color:var(--green)}.stat div{display:flex;flex-direction:column}.stat strong{font:800 27px Manrope}.stat div span{color:var(--muted);font-size:12px}.stat b{margin-left:auto;color:#aaa}.two-col{display:grid;grid-template-columns:2fr 1fr;gap:20px}.panel{background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow);padding:22px;margin-bottom:20px}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:17px}.panel-head h2,.panel h2{font-size:16px;margin-bottom:2px}.panel-head p{color:var(--muted);font-size:12px;margin:0}.panel-head a{color:var(--red);font-weight:600;font-size:12px}.table-wrap{overflow:auto;margin:0 -22px -22px}table{width:100%;border-collapse:collapse}th{text-align:left;color:#8a857f;text-transform:uppercase;font-size:9px;letter-spacing:.1em;padding:11px 18px;border-bottom:1px solid var(--line)}td{padding:14px 18px;border-bottom:1px solid #f0ede8}tbody tr{cursor:pointer}tbody tr:hover{background:#fbfaf8}td strong,td small{display:block}td small{color:var(--muted);margin-top:2px}.badge{display:inline-flex;padding:4px 9px;border-radius:20px;font-size:10px;font-weight:700;white-space:nowrap}.badge.open{background:#fff4cc;color:#8c6200}.badge.in_progress{background:#e8f3fc;color:#236b9d}.badge.waiting{background:#fff0e5;color:#a64a11}.badge.resolved{background:#e6f5ec;color:#22704a}.template-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.template-actions .secondary{font-size:12px;padding:7px 13px;color:#fff}.template-status{padding:6px 13px;border-radius:20px;font-weight:700;font-size:12px;white-space:nowrap}.template-status.ok{background:#e6f5ec;color:#22704a}.template-status.missing{background:#fde8e7;color:#a62b23}.empty{text-align:center;color:var(--muted);padding:30px!important}.store-list{display:grid;gap:17px}.store-list a{display:grid;grid-template-columns:1fr 70px 25px;align-items:center;gap:8px}.store-list div{height:5px;background:#eee;border-radius:5px;overflow:hidden}.store-list i{display:block;height:100%;background:var(--yellow)}.flash,.error{padding:11px 15px;border-radius:9px;margin-bottom:18px}.flash{background:#e7f7ed;color:#206c47}.error{background:#fde8e7;color:#a62b23}.filters{display:flex;gap:10px;align-items:center;margin-bottom:22px;flex-wrap:wrap}.filters input{min-width:260px;flex:1}.filters a{color:var(--muted);font-size:12px}input,select,textarea{width:100%;border:1px solid #dcd6ce;border-radius:8px;padding:10px 12px;background:#fff;color:var(--ink);outline:none}input:focus,select:focus,textarea:focus{border-color:#9d8d7a;box-shadow:0 0 0 3px #eee9e2}textarea{resize:vertical}.primary,.secondary{border:0;border-radius:8px;padding:10px 16px;font-weight:700;cursor:pointer}.primary{background:var(--red);color:#fff}.secondary{background:#302d2a;color:#fff}.stack{display:grid;gap:15px}.stack label,.form-grid label{display:grid;gap:6px;font-size:12px;font-weight:700;color:#5e5954}.check{display:flex!important;align-items:center;grid-auto-flow:column;justify-content:start;gap:8px!important}.check input{width:auto}.case-title{display:flex;justify-content:space-between;align-items:end;margin-bottom:22px}.case-title a{color:var(--muted);font-size:12px}.case-title h2{font-size:21px;margin:12px 0 2px}.case-title p{color:var(--muted);margin:0}.case-layout{display:grid;grid-template-columns:minmax(0,2fr) 320px;gap:20px}.case-side{position:sticky;top:114px;align-self:start;max-height:calc(100vh - 134px);overflow-y:auto;overscroll-behavior:contain;border-radius:13px}.timeline{border-left:2px solid #ddd7cf;margin-left:19px;padding-left:27px}.message{background:#fff;border:1px solid var(--line);border-radius:12px;padding:21px;margin-bottom:17px;position:relative}.message:before{content:'';position:absolute;width:11px;height:11px;border-radius:50%;background:#fff;border:3px solid var(--red);left:-36px;top:30px}.message.outbound{background:#fffdf6}.message.outbound:before{border-color:var(--yellow)}.message header{display:flex;align-items:center;gap:10px}.message header strong,.message header small{display:block}.message header small{color:var(--muted);font-size:11px}.message-state{margin-left:auto;color:var(--muted);font-size:11px}.message h3{margin:20px 0 10px;font-size:15px}.message-body{white-space:pre-wrap;color:#494540}.attachments{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}.attachment-thumb{cursor:zoom-in}.attachment-thumb img{width:96px;height:96px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}.lightbox{position:fixed;inset:0;background:rgba(20,18,16,.85);display:none;align-items:center;justify-content:center;z-index:50;padding:40px}.lightbox.open{display:flex}.lightbox img{max-width:100%;max-height:100%;border-radius:8px;box-shadow:0 20px 60px rgba(0,0,0,.4)}.lightbox-close{position:absolute;top:20px;right:28px;background:none;border:0;color:#fff;font-size:32px;cursor:pointer;line-height:1}.attachment-file{display:inline-flex;align-items:center;gap:6px;background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:8px 12px;font-size:12px;font-weight:600;color:var(--ink)}.rte{border:1px solid #dcd6ce;border-radius:8px;overflow:hidden;background:#fff}.rte-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:2px;padding:6px;border-bottom:1px solid var(--line);background:var(--paper)}.rte-toolbar button,.rte-image-btn{border:0;background:none;border-radius:6px;padding:6px 10px;cursor:pointer;font-size:13px;color:var(--ink)}.rte-toolbar button:hover,.rte-image-btn:hover{background:#eee9e2}.rte-color{border:0;border-radius:6px;padding:0;width:26px;height:26px;cursor:pointer;background:none}.rte-source-toggle{font-family:monospace;margin-left:auto}.rte-source-toggle.active{background:#eee9e2;color:var(--red)}.rte-editor{min-height:140px;padding:12px;outline:none;font:inherit;line-height:1.5}.rte-editor img{max-width:100%}.rte-hidden{display:none}.rte-source{width:100%;min-height:140px;border:0;border-top:1px solid var(--line);border-radius:0;font:12px/1.5 ui-monospace,monospace;resize:vertical}.payout-list{list-style:none;padding:0;margin:0 0 14px;display:grid;gap:8px}.payout-list li{border:1px solid var(--line);border-radius:8px;padding:9px 12px;font-size:12px;color:var(--muted)}.link-danger{color:var(--red);background:none;border:0;padding:12px 0 0;cursor:pointer}.reply-actions{display:flex;justify-content:space-between;align-items:end}.reply-actions label{display:flex;align-items:center;gap:8px}.reply-actions select{width:auto}.analysis dl{margin:13px 0 0}.analysis dl div{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding:10px 0}.analysis dt{color:var(--muted)}.analysis dd{font-weight:700;margin:0}.card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.template-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:22px;box-shadow:var(--shadow)}.template-card:hover{border-color:#c9bcae}.template-card>div{display:flex;justify-content:space-between}.template-card h2{font-size:17px;margin-top:18px}.template-card p{color:var(--muted)}.template-card>span{color:var(--red);font-weight:700}.muted,.hint{color:var(--muted);font-size:12px}.narrow{max-width:760px}.narrow>a{display:block;color:var(--muted);margin-bottom:14px}.narrow .panel{padding:28px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:15px;margin-top:20px}.form-grid .checks,.form-grid button{grid-column:1/-1}.checks{display:flex;gap:20px}.create-box summary,.rules-list summary{cursor:pointer;list-style:none}.create-box summary{font-weight:800;color:var(--red)}.rules-list summary{display:flex;align-items:center;gap:12px}.rules-list summary span:last-child{margin-left:auto;color:var(--muted);font-size:12px}.status-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}.system-check{display:flex;gap:15px}.status-dot{width:12px;height:12px;border-radius:50%;background:#aaa;margin-top:7px}.status-dot.ok{background:#35a76d}.status-dot.error{background:var(--red)}.system-check p,.system-check small{color:var(--muted)}.login-page{min-height:100vh;display:grid;grid-template-columns:minmax(420px,520px) 1fr;background:#fff}.login-card{padding:45px 70px;display:flex;flex-direction:column;justify-content:center}.login-brand{position:absolute;top:40px;display:flex;align-items:center;gap:11px}.login-brand strong,.login-brand small{display:block}.login-copy h1{font-size:35px;line-height:1.12;margin:12px 0}.login-copy p{color:var(--muted);margin-bottom:30px}.login-visual{background:#282421;color:#fff;position:relative;overflow:hidden;display:flex;align-items:end;padding:70px}.quote{font:700 32px/1.3 Manrope;max-width:600px;z-index:2}.pattern{position:absolute;font:bold 65vw Arial;color:var(--yellow);opacity:.95;line-height:.7;right:-15%;top:12%;transform:rotate(-10deg)}.pagination{padding-top:20px}.pagination nav>div:first-child{display:none}.pagination nav>div:last-child{display:flex;justify-content:space-between}.pagination svg{width:16px}.spell-error{text-decoration:underline wavy var(--red);text-decoration-thickness:1.5px;text-underline-offset:3px;cursor:pointer}.spell-suggestions{position:absolute;z-index:60;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);padding:4px;display:grid;min-width:140px}.spell-suggestions button{border:0;background:none;text-align:left;padding:8px 10px;border-radius:6px;cursor:pointer;font-size:13px;color:var(--ink)}.spell-suggestions button:hover{background:var(--paper)}
@media(max-width:1050px){.stat-grid{grid-template-columns:repeat(2,1fr)}.two-col,.case-layout{grid-template-columns:1fr}.case-side{position:static;max-height:none;overflow:visible}.card-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.app-shell{display:block}.sidebar{transform:translateX(-100%);transition:.2s}.nav-open .sidebar{transform:none}.topbar{padding:16px 20px;height:80px}.menu{display:block;border:0;background:none;font-size:21px;margin-right:13px}.topbar>div:first-of-type{margin-right:auto}.live{display:none}main{grid-column:auto}.content{padding:22px 16px}.stat-grid,.card-grid,.status-grid{grid-template-columns:1fr}.intro{display:block}.filters{display:grid}.filters input{min-width:0}.form-grid{grid-template-columns:1fr}.form-grid .checks,.form-grid button{grid-column:auto}.login-page{display:block;background:#282421;padding:20px}.login-card{background:#fff;border-radius:15px;padding:120px 28px 35px;min-height:calc(100vh - 40px)}.login-brand{top:55px}.login-visual{display:none}}
.filters{display:grid;grid-template-columns:minmax(230px,1.4fr) repeat(4,minmax(130px,1fr)) auto auto;align-items:center;gap:10px;flex-wrap:unset}.filters input{min-width:0}.filters .active-filter{grid-column:1/-1;background:#fff5d6;color:#7c5900;padding:6px 10px;border-radius:7px;width:max-content}.sender-link{color:#9e241b;font-weight:600}.sender-link b{display:inline-grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:#f3e4e2;font-size:10px;margin-left:3px}.simulation-tag{display:inline-flex;vertical-align:middle;background:#5d43aa;color:#fff;border-radius:4px;padding:2px 5px;font:700 8px 'DM Sans';letter-spacing:.08em}.simulation-note{background:#f1edff;border:1px solid #d7cdf8;color:#44317e;border-radius:11px;padding:14px 17px;margin-bottom:18px}.simulation-note p{margin:3px 0 0;color:#65568f}.intro .primary{color:#fff}.reply>h2{margin-bottom:16px}
@media(max-width:1250px){.filters{grid-template-columns:minmax(220px,1.4fr) repeat(2,minmax(140px,1fr))}.filters .secondary,.filters>a{align-self:stretch}.filters .active-filter{grid-column:1/-1}}@media(max-width:760px){.filters{grid-template-columns:1fr}.filters .active-filter{grid-column:auto;width:auto}.reply-actions{align-items:stretch;gap:12px;flex-direction:column}.reply-actions label{justify-content:space-between}.reply-actions select{width:100%}}
@media(min-width:761px){.filters{grid-template-columns:minmax(220px,1.5fr) repeat(4,minmax(125px,1fr)) auto auto;overflow-x:auto}.filters .active-filter{grid-column:1/-1}}
.action-row{display:flex;gap:10px;align-items:center}.action-row form{margin:0}@media(max-width:760px){.action-row{align-items:stretch;flex-direction:column;margin-top:12px}.action-row button{width:100%}}

.timeline-hint{margin:0 0 10px}.message.third-party{background:#f7f9fc}.message.third-party .avatar{background:#5b6b80;color:#fff}.message-quote{margin-top:14px;border-top:1px dashed var(--line);padding-top:10px}.message-quote summary{cursor:pointer;color:var(--muted);font-size:12px}.message-quote .message-body{margin-top:10px;color:var(--muted);font-size:13px}.message.third-party:before{border-color:#5b6b80}
.nav-count{margin-left:auto;float:right;background:var(--red);color:#fff;border-radius:10px;padding:0 7px;font-size:11px;line-height:18px}tbody tr.unread td{background:#fffbea}tbody tr.unread td strong{font-weight:800}.unread-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--red);margin-right:7px;vertical-align:middle}.badge.outgoing{background:#ece8f8;color:#55449a;margin-left:6px}.link-muted{background:none;border:0;color:var(--muted);font-size:12px;cursor:pointer;text-decoration:underline}.case-title-actions{display:flex;align-items:center;gap:12px}.case-title-actions form{margin:0}.unread-filter{font-size:12px;color:var(--muted);white-space:nowrap}

.field-label{display:grid;gap:6px;font-size:12px;font-weight:700;color:#5e5954}.reply .form-grid{margin-top:0}
.reply{position:sticky;bottom:0;z-index:5;margin:16px 0 0;padding:0;max-height:60vh;overflow-y:auto;box-shadow:0 -10px 28px rgba(35,31,27,.14)}.reply>summary{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;padding:14px 22px;background:#fff;cursor:pointer;list-style:none}.reply>summary::-webkit-details-marker{display:none}.reply>summary::after{content:'▲ Öffnen';color:var(--muted);font-size:12px}.reply[open]>summary::after{content:'▼ Einklappen'}.reply>summary h2{margin:0}.reply>form{padding:4px 22px 18px}.reply .rte-editor{max-height:30vh;overflow-y:auto}
.rte-image-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:6px 10px;border-bottom:1px solid var(--line);background:#fffbea;font-weight:400}.rte-image-bar[hidden]{display:none}.rte-image-bar button{border:1px solid #dcd6ce;background:#fff;border-radius:6px;padding:3px 9px;font-size:12px;cursor:pointer}.rte-image-size{flex:1;min-width:100px;max-width:240px;padding:0}.rte-image-size-value{min-width:48px;color:var(--muted)}.rte-editor img{cursor:pointer}.rte-editor img.rte-image-selected{outline:2px solid var(--yellow);outline-offset:1px}
.voucher-filters{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:14px}.voucher-filters>input{flex:1;min-width:200px;max-width:320px}.voucher-filters label{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);white-space:nowrap}.voucher-filters input[type=date]{width:auto}
.spell-suggestions-status{padding:8px 10px;font-size:13px;color:var(--muted)}
