/* LG ITS Support CMS 1.0.37 – persistenter Hell-/Dunkelmodus für Frontend und Backend */
html[data-color-mode="dark"]{
  color-scheme:dark;
  --ink:#edf3fa!important;
  --ink-2:#c8d4e1!important;
  --muted:#98a8ba!important;
  --line:#2a394a!important;
  --surface:#111a25!important;
  --surface-2:#0b131d!important;
  --surface-3:#192534!important;
  --dark:#070d14!important;
  --dark-2:#101923!important;
  --success:#4fd19a!important;
  --warning:#f4b64f!important;
  --danger:#ff7485!important;
  --shadow:0 20px 52px rgba(0,0,0,.38)!important;
  --shadow-sm:0 10px 28px rgba(0,0,0,.28)!important;
}
html[data-color-mode="dark"] body{background:var(--surface);color:var(--ink)}
html[data-color-mode="dark"] input,
html[data-color-mode="dark"] select,
html[data-color-mode="dark"] textarea{color-scheme:dark;background:var(--surface-2);color:var(--ink);border-color:var(--line)}
html[data-color-mode="dark"] input::placeholder,
html[data-color-mode="dark"] textarea::placeholder{color:#718399}
html[data-color-mode="dark"] option{background:var(--surface);color:var(--ink)}
html[data-color-mode="dark"] ::selection{background:rgba(var(--accent-rgb),.38);color:#fff}

/* Einheitlicher Umschalter */
.color-mode-toggle{position:relative;display:inline-grid;place-items:center;flex:0 0 auto;width:42px;height:42px;padding:0;border:1px solid var(--line);border-radius:11px;background:var(--surface);color:var(--muted);box-shadow:none;transition:background .18s,border-color .18s,color .18s,transform .18s}
.color-mode-toggle:hover{background:var(--surface-2);border-color:color-mix(in srgb,var(--accent) 35%,var(--line));color:var(--ink);transform:translateY(-1px)}
.color-mode-toggle .icon{width:18px;height:18px}
.color-mode-toggle .mode-icon{display:grid;place-items:center;grid-area:1/1}
.color-mode-toggle .mode-icon-sun{display:none}
html[data-color-mode="dark"] .color-mode-toggle .mode-icon-moon{display:none}
html[data-color-mode="dark"] .color-mode-toggle .mode-icon-sun{display:grid}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.frontend-color-mode-toggle{margin-left:2px}
.admin-color-mode-toggle{width:39px;height:39px;border-radius:9px}
.admin-login-color-toggle{position:fixed;top:20px;right:20px;z-index:20;background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:blur(14px)}

/* Öffentliches Frontend */
html[data-color-mode="dark"] .site-header{background:color-mix(in srgb,var(--surface) 92%,transparent)}
html[data-color-mode="dark"] .site-header.is-scrolled{background:color-mix(in srgb,var(--surface) 94%,transparent)}
html[data-color-mode="dark"] .main-nav.open,
html[data-color-mode="dark"] .main-nav .nav-submenu,
html[data-color-mode="dark"] .button-secondary,
html[data-color-mode="dark"] .pagination a,
html[data-color-mode="dark"] .feedback-modal,
html[data-color-mode="dark"] .support-info-gate,
html[data-color-mode="dark"] .download-disabled-card,
html[data-color-mode="dark"] .kb-search,
html[data-color-mode="dark"] .kb-side-card,
html[data-color-mode="dark"] .kb-article-body,
html[data-color-mode="dark"] .ticket-tracking-card,
html[data-color-mode="dark"] .public-ticket-summary,
html[data-color-mode="dark"] .ticket-code,
html[data-color-mode="dark"] .message-card,
html[data-color-mode="dark"] .form-card,
html[data-color-mode="dark"] .filter-panel,
html[data-color-mode="dark"] .download-card,
html[data-color-mode="dark"] .device-card,
html[data-color-mode="dark"] .process-card,
html[data-color-mode="dark"] .service-tile,
html[data-color-mode="dark"] .hero-panel,
html[data-color-mode="dark"] .cta-panel,
html[data-color-mode="dark"] .content-card,
html[data-color-mode="dark"] .detail-content-card{background-color:var(--surface);border-color:var(--line);color:var(--ink)}
html[data-color-mode="dark"] .button-light{background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-color-mode="dark"] .alert-info{background:rgba(55,135,230,.12);border-color:rgba(92,160,239,.28);color:#9ec9ff}
html[data-color-mode="dark"] .alert-error{background:rgba(224,65,82,.12);border-color:rgba(255,116,133,.28);color:#ffacb7}
html[data-color-mode="dark"] .alert-success{background:rgba(54,190,132,.12);border-color:rgba(79,209,154,.28);color:#8ae7bd}
html[data-color-mode="dark"] .kb-page,
html[data-color-mode="dark"] .ticket-status-page{background:linear-gradient(180deg,var(--surface-2) 0,var(--surface) 540px)}
html[data-color-mode="dark"] .kb-laptop-screen,
html[data-color-mode="dark"] .kb-laptop-screen i{background:#1b2938}
html[data-color-mode="dark"] .feedback-modal-backdrop{background:rgba(2,8,15,.74)}
html[data-color-mode="dark"] .feedback-modal header,
html[data-color-mode="dark"] .feedback-modal footer{border-color:var(--line)}
html[data-color-mode="dark"] .feedback-modal [data-feedback-close]{color:var(--muted)}
html[data-color-mode="dark"] .site-footer{background:#070d14}
html[data-color-mode="dark"] .site-footer .brand-copy strong,
html[data-color-mode="dark"] .site-footer h3{color:#edf3fa}
html[data-color-mode="dark"] .theme-logo-img{filter:none}

/* Visuelle TinyMCE-/Custom-Page-Bausteine */
html[data-color-mode="dark"]{
  --its-block-surface:var(--surface)!important;
  --its-block-soft:var(--surface-2)!important;
  --its-block-line:var(--line)!important;
  --its-block-text:var(--ink)!important;
  --its-block-muted:var(--muted)!important;
}
html[data-color-mode="dark"] .its-card,
html[data-color-mode="dark"] .its-stat,
html[data-color-mode="dark"] .its-info-surface,
html[data-color-mode="dark"] .its-faq details,
html[data-color-mode="dark"] .its-alert{box-shadow:0 12px 30px rgba(0,0,0,.18)}

/* Backend und Login */
html[data-color-mode="dark"] .admin-body,
html[data-color-mode="dark"] .admin-login-body{
  --admin-bg:#0b121c;
  --admin-panel:#121c28;
  --admin-line:#29384a;
  --admin-muted:#93a4b8;
  --admin-ink:#edf3fa;
  --admin-side:#070e16;
  --admin-side-2:#101a26;
  background:var(--admin-bg);
  color:var(--admin-ink);
}
html[data-color-mode="dark"] .admin-topbar{background:color-mix(in srgb,var(--admin-panel) 93%,transparent)}
html[data-color-mode="dark"] .admin-search{background:var(--admin-bg)}
html[data-color-mode="dark"] .admin-content,
html[data-color-mode="dark"] .admin-main{color:var(--admin-ink)}
html[data-color-mode="dark"] .admin-panel,
html[data-color-mode="dark"] .content-panel,
html[data-color-mode="dark"] .metric-card,
html[data-color-mode="dark"] .team-card,
html[data-color-mode="dark"] .activity-card,
html[data-color-mode="dark"] .admin-login-card,
html[data-color-mode="dark"] .installer-card,
html[data-color-mode="dark"] .ticket-detail,
html[data-color-mode="dark"] .ticket-list-panel,
html[data-color-mode="dark"] .ticket-list-cards,
html[data-color-mode="dark"] .ticket-list-card,
html[data-color-mode="dark"] .tickets-panel .ticket-table,
html[data-color-mode="dark"] .tickets-panel .ticket-table-row,
html[data-color-mode="dark"] .message-card .message-content,
html[data-color-mode="dark"] .login-remember,
html[data-color-mode="dark"] .two-factor-qr-panel,
html[data-color-mode="dark"] .two-factor-qr,
html[data-color-mode="dark"] .feedback-card,
html[data-color-mode="dark"] .settings-card,
html[data-color-mode="dark"] .editor-card{background:var(--admin-panel)!important;border-color:var(--admin-line)!important;color:var(--admin-ink)!important}
html[data-color-mode="dark"] .ticket-list-card:hover,
html[data-color-mode="dark"] .tickets-panel .ticket-table-row:hover,
html[data-color-mode="dark"] .content-table-row:hover{background:#172332!important}
html[data-color-mode="dark"] .ticket-list-card.is-active{background:rgba(var(--accent-rgb),.12)!important}
html[data-color-mode="dark"] .content-table-head,
html[data-color-mode="dark"] .ticket-table-head,
html[data-color-mode="dark"] .panel-head,
html[data-color-mode="dark"] .meta-section,
html[data-color-mode="dark"] .reply-composer,
html[data-color-mode="dark"] .admin-footer{background:color-mix(in srgb,var(--admin-panel) 88%,var(--admin-bg));border-color:var(--admin-line)}
html[data-color-mode="dark"] .content-table-row,
html[data-color-mode="dark"] .ticket-table-row,
html[data-color-mode="dark"] .message-card,
html[data-color-mode="dark"] .internal-note-card{border-color:var(--admin-line)}
html[data-color-mode="dark"] .row-actions details>div,
html[data-color-mode="dark"] .dropdown-menu,
html[data-color-mode="dark"] .ticket-head-card-body{background:var(--admin-panel);border-color:var(--admin-line);box-shadow:0 18px 45px rgba(0,0,0,.35)}
html[data-color-mode="dark"] .admin-body input,
html[data-color-mode="dark"] .admin-body select,
html[data-color-mode="dark"] .admin-body textarea,
html[data-color-mode="dark"] .admin-login-body input{background:var(--admin-bg)!important;border-color:var(--admin-line)!important;color:var(--admin-ink)!important}
html[data-color-mode="dark"] .admin-body input:focus,
html[data-color-mode="dark"] .admin-body select:focus,
html[data-color-mode="dark"] .admin-body textarea:focus,
html[data-color-mode="dark"] .admin-login-body input:focus{border-color:color-mix(in srgb,var(--accent) 65%,var(--admin-line))!important;box-shadow:0 0 0 3px rgba(var(--accent-rgb),.14)!important}
html[data-color-mode="dark"] .login-remember>span{background:var(--admin-bg);border-color:var(--admin-line)}
html[data-color-mode="dark"] .button-danger{background:rgba(226,72,91,.12)!important;border-color:rgba(255,116,133,.28)!important;color:#ff9dab!important}
html[data-color-mode="dark"] .mail-state-failed,
html[data-color-mode="dark"] .requirement-item.is-error>span,
html[data-color-mode="dark"] .kb-module-status.is-inactive{background:rgba(224,65,82,.12)!important;color:#ff9dab!important}
html[data-color-mode="dark"] .device-admin-support.is-legacy{background:rgba(244,182,79,.12)!important;color:#ffd083!important}
html[data-color-mode="dark"] .preview-frame-wrap iframe,
html[data-color-mode="dark"] .builder-preview-frame,
html[data-color-mode="dark"] .builder-preview-frame iframe,
html[data-color-mode="dark"] .kb-preview-frame{background:var(--surface-2)}
html[data-color-mode="dark"] .admin-flash{box-shadow:0 18px 45px rgba(0,0,0,.38)}
html[data-color-mode="dark"] .admin-login-visual{background:linear-gradient(145deg,#070d14,#111d2a 62%,#172536)}
html[data-color-mode="dark"] .login-security{background:rgba(255,255,255,.055);border-color:rgba(255,255,255,.1)}

/* TinyMCE-Oberfläche: funktioniert auch nach einem Umschalten ohne Neuladen */
html[data-color-mode="dark"] .tox.tox-tinymce,
html[data-color-mode="dark"] .tox .tox-editor-header,
html[data-color-mode="dark"] .tox .tox-toolbar-overlord,
html[data-color-mode="dark"] .tox .tox-toolbar,
html[data-color-mode="dark"] .tox .tox-toolbar__primary,
html[data-color-mode="dark"] .tox .tox-menubar,
html[data-color-mode="dark"] .tox .tox-statusbar,
html[data-color-mode="dark"] .tox .tox-dialog,
html[data-color-mode="dark"] .tox .tox-dialog__header,
html[data-color-mode="dark"] .tox .tox-dialog__footer,
html[data-color-mode="dark"] .tox .tox-collection__group{background:#111b27!important;border-color:#2a394a!important;color:#edf3fa!important}
html[data-color-mode="dark"] .tox .tox-tbtn,
html[data-color-mode="dark"] .tox .tox-mbtn,
html[data-color-mode="dark"] .tox .tox-statusbar__path-item,
html[data-color-mode="dark"] .tox .tox-label,
html[data-color-mode="dark"] .tox .tox-dialog__title,
html[data-color-mode="dark"] .tox .tox-collection__item-label{color:#dce6f1!important}
html[data-color-mode="dark"] .tox .tox-tbtn svg,
html[data-color-mode="dark"] .tox .tox-mbtn svg{fill:#dce6f1!important}
html[data-color-mode="dark"] .tox .tox-tbtn:hover,
html[data-color-mode="dark"] .tox .tox-tbtn--enabled,
html[data-color-mode="dark"] .tox .tox-mbtn:hover,
html[data-color-mode="dark"] .tox .tox-collection__item--active{background:#213044!important}
html[data-color-mode="dark"] .tox .tox-textfield,
html[data-color-mode="dark"] .tox .tox-textarea,
html[data-color-mode="dark"] .tox .tox-listboxfield .tox-listbox--select{background:#0b131d!important;border-color:#2a394a!important;color:#edf3fa!important}

@media(max-width:1000px){
  .frontend-color-mode-toggle{margin-left:0}
  .menu-toggle{margin-left:auto}
}
@media(max-width:620px){
  .color-mode-toggle{width:39px;height:39px}
  .admin-login-color-toggle{top:12px;right:12px}
}

/* v1.0.35: Ticketverlauf und rechte Ticket-Metaspalte vollständig abgedunkelt */
html[data-color-mode="dark"] .admin-content .ticket-workspace,
html[data-color-mode="dark"] .admin-content .ticket-detail-panel,
html[data-color-mode="dark"] .admin-content .ticket-list-panel{
  background:var(--admin-panel)!important;
  border-color:var(--admin-line)!important;
}
html[data-color-mode="dark"] .admin-content .ticket-detail-head,
html[data-color-mode="dark"] .admin-content .ticket-detail-primary,
html[data-color-mode="dark"] .admin-content .ticket-detail-head-actions,
html[data-color-mode="dark"] .admin-content .ticket-head-overview{
  background:var(--admin-panel)!important;
  border-color:var(--admin-line)!important;
}
html[data-color-mode="dark"] .ticket-head-overview>.ticket-head-card>summary{
  background:transparent!important;
  border-color:var(--admin-line)!important;
  color:var(--admin-ink)!important;
}
html[data-color-mode="dark"] .ticket-head-overview>.ticket-head-card>summary:hover{
  background:rgba(var(--accent-rgb),.075)!important;
}
html[data-color-mode="dark"] .ticket-head-overview>.ticket-head-card[open]>summary{
  background:linear-gradient(180deg,rgba(var(--accent-rgb),.16),rgba(var(--accent-rgb),.055))!important;
  box-shadow:inset 0 4px 0 var(--accent)!important;
}
html[data-color-mode="dark"] .ticket-head-panel-stage,
html[data-color-mode="dark"] .ticket-head-panel-stage>.ticket-head-card-body,
html[data-color-mode="dark"] .ticket-head-card-body,
html[data-color-mode="dark"] .ticket-head-data-grid,
html[data-color-mode="dark"] .ticket-tracking-admin,
html[data-color-mode="dark"] .ticket-head-tracking-grid{
  background:var(--admin-panel)!important;
  border-color:var(--admin-line)!important;
  color:var(--admin-ink)!important;
}
html[data-color-mode="dark"] .ticket-head-data-grid>div,
html[data-color-mode="dark"] .ticket-head-card .tracking-admin-item,
html[data-color-mode="dark"] .tracking-admin-item,
html[data-color-mode="dark"] .tracking-admin-form,
html[data-color-mode="dark"] .tracking-admin-sync{
  background:color-mix(in srgb,var(--admin-panel) 88%,var(--admin-bg))!important;
  border-color:var(--admin-line)!important;
}
html[data-color-mode="dark"] .tracking-admin-item>summary:hover{
  background:rgba(var(--accent-rgb),.06)!important;
}
html[data-color-mode="dark"] .ticket-head-data-grid dt,
html[data-color-mode="dark"] .ticket-head-tracking-intro p,
html[data-color-mode="dark"] .tracking-admin-item summary small,
html[data-color-mode="dark"] .tracking-admin-form label>span,
html[data-color-mode="dark"] .tracking-admin-sync>span{
  color:var(--admin-muted)!important;
}
html[data-color-mode="dark"] .ticket-head-data-grid dd,
html[data-color-mode="dark"] .tracking-admin-item summary strong{
  color:var(--admin-ink)!important;
}

/* Linke Ticketliste: keine hellen Restflächen */
html[data-color-mode="dark"] .admin-content .ticket-list-tools,
html[data-color-mode="dark"] .admin-content .ticket-tabs,
html[data-color-mode="dark"] .admin-content .ticket-list-cards{
  background:var(--admin-panel)!important;
  border-color:var(--admin-line)!important;
}
html[data-color-mode="dark"] .admin-content .ticket-list-card{
  background:var(--admin-panel)!important;
  border-color:var(--admin-line)!important;
}
html[data-color-mode="dark"] .admin-content .ticket-list-card:hover{
  background:#182534!important;
}
html[data-color-mode="dark"] .admin-content .ticket-list-card.is-active,
html[data-color-mode="dark"] .admin-content .ticket-list-card[class*="ticket-visual-"].is-active{
  background:linear-gradient(90deg,color-mix(in srgb,var(--ticket-tone,var(--accent)) 18%,var(--admin-panel)),var(--admin-panel) 78%)!important;
}
html[data-color-mode="dark"] .admin-content .ticket-list-card[class*="ticket-visual-"] .ticket-list-symbol,
html[data-color-mode="dark"] .admin-content .dashboard-ticket-list-row[class*="ticket-visual-"] .dashboard-list-icon{
  background:color-mix(in srgb,var(--ticket-tone) 18%,var(--admin-panel))!important;
}
html[data-color-mode="dark"] .admin-content .ticket-list-summary span,
html[data-color-mode="dark"] .admin-content .ticket-list-fact,
html[data-color-mode="dark"] .admin-content .ticket-list-card footer{
  border-color:var(--admin-line)!important;
  color:var(--admin-muted)!important;
}

/* Ticket-Chat: ruhige dunkle Fläche und klar getrennte Sprechblasen */
html[data-color-mode="dark"] .admin-content .message-stream{
  background:linear-gradient(180deg,#0a131d 0%,#0d1824 55%,#101b27 100%)!important;
  color:var(--admin-ink)!important;
}
html[data-color-mode="dark"] .ticket-conversation-livebar{
  background:#121e2b!important;
  border-color:#2d4054!important;
  box-shadow:0 8px 24px rgba(0,0,0,.2)!important;
}
html[data-color-mode="dark"] .ticket-conversation-refresh,
html[data-color-mode="dark"] .ticket-conversation-jump{
  background:#172432!important;
  border-color:#314257!important;
  color:#b9c8d8!important;
}
html[data-color-mode="dark"] .ticket-conversation-refresh:hover,
html[data-color-mode="dark"] .ticket-conversation-jump:hover{
  background:rgba(var(--accent-rgb),.13)!important;
  border-color:rgba(var(--accent-rgb),.45)!important;
  color:#fff!important;
}
html[data-color-mode="dark"] .admin-content .message-card header strong{
  color:var(--admin-ink)!important;
}
html[data-color-mode="dark"] .admin-content .message-card header small,
html[data-color-mode="dark"] .admin-content .message-card header>span:last-child{
  color:#91a3b7!important;
}
html[data-color-mode="dark"] .admin-content .message-card .message-content{
  background:#172432!important;
  border-color:#2b3d51!important;
  color:var(--admin-ink)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.24)!important;
}
html[data-color-mode="dark"] .admin-content .message-card.customer-message .message-content{
  background:linear-gradient(180deg,#132b43 0%,#10263b 100%)!important;
  border-color:#265176!important;
}
html[data-color-mode="dark"] .admin-content .message-card .message-content :is(p,li,h1,h2,h3,h4,h5,h6,strong,em,span,blockquote,td,th){
  color:var(--admin-ink)!important;
}
html[data-color-mode="dark"] .admin-content .message-card .message-content a{
  color:#80baff!important;
}
html[data-color-mode="dark"] .admin-content .message-card .message-content blockquote{
  background:#101b27!important;
  border-color:#425a73!important;
}
html[data-color-mode="dark"] .admin-content .message-card .message-content code,
html[data-color-mode="dark"] .admin-content .message-card .message-content pre{
  background:#09121b!important;
  color:#d7e5f4!important;
  border-color:#2a3b4e!important;
}
html[data-color-mode="dark"] .admin-content .message-card .message-content table,
html[data-color-mode="dark"] .admin-content .message-card .message-content td,
html[data-color-mode="dark"] .admin-content .message-card .message-content th{
  border-color:#34485f!important;
}
html[data-color-mode="dark"] .admin-content .message-card .message-attachments,
html[data-color-mode="dark"] .admin-content .message-card .message-attachments a{
  background:#121f2c!important;
  border-color:#2b3e52!important;
  color:var(--admin-ink)!important;
}
html[data-color-mode="dark"] .admin-content .message-card.customer-message .message-attachments,
html[data-color-mode="dark"] .admin-content .message-card.customer-message .message-attachments a{
  background:#112940!important;
  border-color:#285174!important;
}
html[data-color-mode="dark"] .admin-content .message-attachments strong{
  color:var(--admin-ink)!important;
}
html[data-color-mode="dark"] .admin-content .message-attachments small{
  color:var(--admin-muted)!important;
}

/* Interne Notiz mit warmem, aber dunklem Kontrast */
html[data-color-mode="dark"] .admin-content .internal-note{
  background:linear-gradient(180deg,#211d16 0%,#1b1813 100%)!important;
  border-color:rgba(244,182,79,.34)!important;
  color:#f4ead7!important;
  box-shadow:0 14px 34px rgba(0,0,0,.22)!important;
}
html[data-color-mode="dark"] .admin-content .internal-note-head{
  background:rgba(244,182,79,.035)!important;
  border-color:rgba(244,182,79,.2)!important;
}
html[data-color-mode="dark"] .admin-content .internal-note-icon,
html[data-color-mode="dark"] .admin-content .internal-note-label{
  background:rgba(244,182,79,.11)!important;
  border-color:rgba(244,182,79,.25)!important;
  color:#ffc766!important;
}
html[data-color-mode="dark"] .admin-content .internal-note-private{
  background:#17140f!important;
  border-color:rgba(244,182,79,.24)!important;
  color:#f4bf61!important;
}
html[data-color-mode="dark"] .admin-content .internal-note-meta strong,
html[data-color-mode="dark"] .admin-content .internal-note-content,
html[data-color-mode="dark"] .admin-content .internal-note-content :is(p,li,strong,em,span,blockquote,h1,h2,h3,h4,h5,h6){
  color:#f4ead7!important;
}
html[data-color-mode="dark"] .admin-content .internal-note-meta time{
  color:#bcae98!important;
}
html[data-color-mode="dark"] .admin-content .internal-note-content blockquote{
  background:rgba(244,182,79,.07)!important;
  border-color:rgba(244,182,79,.42)!important;
}
html[data-color-mode="dark"] .admin-content .internal-note-attachments,
html[data-color-mode="dark"] .admin-content .internal-note-attachments a{
  background:#17140f!important;
  border-color:rgba(244,182,79,.22)!important;
}

/* Rechte Metaspalte einschließlich Kundendaten und Dateiliste */
html[data-color-mode="dark"] .admin-content .ticket-meta{
  background:#0f1925!important;
  border-color:var(--admin-line)!important;
}
html[data-color-mode="dark"] .admin-content .ticket-meta .meta-accordion{
  background:#121e2b!important;
  border-color:#2b3d51!important;
  box-shadow:0 8px 24px rgba(0,0,0,.14)!important;
}
html[data-color-mode="dark"] .admin-content .meta-accordion>summary{
  background:linear-gradient(180deg,#172432 0%,#131f2c 100%)!important;
  border-color:#2b3d51!important;
  color:var(--admin-ink)!important;
}
html[data-color-mode="dark"] .admin-content .meta-accordion>summary:hover{
  background:linear-gradient(180deg,#1b2a3a 0%,#172432 100%)!important;
}
html[data-color-mode="dark"] .admin-content .meta-accordion[open]>summary{
  background:linear-gradient(180deg,rgba(var(--accent-rgb),.13),#172432)!important;
}
html[data-color-mode="dark"] .admin-content .meta-accordion>summary span{
  color:#bac8d7!important;
}
html[data-color-mode="dark"] .admin-content .meta-accordion-body{
  background:#101b27!important;
  border-color:#2b3d51!important;
  color:var(--admin-ink)!important;
}
html[data-color-mode="dark"] .admin-content .meta-accordion-body dl>div{
  border-color:#27384a!important;
}
html[data-color-mode="dark"] .admin-content .meta-accordion-body dt{
  color:#8fa2b6!important;
}
html[data-color-mode="dark"] .admin-content .meta-accordion-body dd,
html[data-color-mode="dark"] .admin-content .meta-accordion-body dd a,
html[data-color-mode="dark"] .admin-content .meta-accordion-body dd small{
  color:#dce7f2!important;
}
html[data-color-mode="dark"] .admin-content .ticket-customer-file{
  background:#172432!important;
  border-color:#2d4054!important;
  color:var(--admin-ink)!important;
}
html[data-color-mode="dark"] .admin-content .ticket-customer-file:hover{
  background:#1b2b3c!important;
  border-color:rgba(var(--accent-rgb),.46)!important;
}
html[data-color-mode="dark"] .admin-content .ticket-customer-file-type{
  background:rgba(var(--accent-rgb),.16)!important;
}
html[data-color-mode="dark"] .admin-content .ticket-customer-files-empty{
  background:#152230!important;
  border-radius:9px;
}

/* Antwortbereich bleibt optisch Teil des dunklen Ticketfensters */
html[data-color-mode="dark"] .admin-content .reply-composer{
  background:#111d29!important;
  border-color:#2b3d51!important;
}
html[data-color-mode="dark"] .admin-content .reply-tabs{
  border-color:#2b3d51!important;
}
html[data-color-mode="dark"] .admin-content .composer-attachment,
html[data-color-mode="dark"] .admin-content .composer-tracking-hint,
html[data-color-mode="dark"] .admin-content .composer-hint{
  color:var(--admin-muted)!important;
}
html[data-color-mode="dark"] .ticket-conversation-empty{
  background:#111d29!important;
  border-color:#33465b!important;
}

/* Dashboard-Tickets ebenfalls ohne weiße Karten im Dunkelmodus */
html[data-color-mode="dark"] .admin-content .tickets-panel .ticket-table,
html[data-color-mode="dark"] .admin-content .tickets-panel .dashboard-ticket-list-row,
html[data-color-mode="dark"] .admin-content .tickets-panel .ticket-table-row{
  background:var(--admin-panel)!important;
  border-color:var(--admin-line)!important;
}
html[data-color-mode="dark"] .admin-content .tickets-panel .dashboard-ticket-list-row:hover,
html[data-color-mode="dark"] .admin-content .tickets-panel .ticket-table-row:hover{
  background:#182534!important;
}
html[data-color-mode="dark"] .admin-content .tickets-panel .dashboard-ticket-list-row[class*="ticket-visual-"]{
  background:linear-gradient(90deg,color-mix(in srgb,var(--ticket-tone) 13%,var(--admin-panel)),var(--admin-panel) 75%)!important;
}

/* v1.0.36: Login und TinyMCE im Backend vollständig an den Darkmode angepasst */
html[data-color-mode="dark"] .admin-login-body{
  min-height:100svh;
  background:#09111b;
  color:#edf3fa;
}
html[data-color-mode="dark"] .admin-login-shell{
  min-height:100svh;
  background:#09111b;
}
html[data-color-mode="dark"] .admin-login-visual{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:
    radial-gradient(circle at 14% 16%,rgba(var(--accent-rgb),.14),transparent 28%),
    radial-gradient(circle at 86% 82%,rgba(60,116,173,.15),transparent 34%),
    linear-gradient(145deg,#07101a 0%,#0d1824 55%,#142334 100%);
  border-right:1px solid rgba(147,164,184,.14);
}
html[data-color-mode="dark"] .admin-login-visual:before{
  content:"";
  position:absolute;
  inset:auto -180px -230px auto;
  width:520px;
  height:520px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:50%;
  box-shadow:0 0 0 70px rgba(255,255,255,.018),0 0 0 150px rgba(255,255,255,.012);
  z-index:-1;
}
html[data-color-mode="dark"] .admin-login-brand strong,
html[data-color-mode="dark"] .admin-login-visual h1,
html[data-color-mode="dark"] .login-security strong{
  color:#f7f9fc;
}
html[data-color-mode="dark"] .admin-login-brand small,
html[data-color-mode="dark"] .admin-login-visual p,
html[data-color-mode="dark"] .login-security small{
  color:#9fb0c3;
}
html[data-color-mode="dark"] .login-security{
  width:min(100%,680px);
  padding:17px 19px;
  border:1px solid rgba(152,168,186,.18);
  border-radius:15px;
  background:linear-gradient(135deg,rgba(255,255,255,.07),rgba(255,255,255,.035));
  box-shadow:0 18px 45px rgba(0,0,0,.18);
  backdrop-filter:blur(12px);
}
html[data-color-mode="dark"] .login-security>.icon{
  flex:0 0 auto;
  width:25px;
  color:#ff7187;
}
html[data-color-mode="dark"] .admin-login-card{
  position:relative;
  background:linear-gradient(180deg,#121d2a 0%,#101a26 100%)!important;
  border-left:1px solid #263648!important;
  box-shadow:-22px 0 70px rgba(0,0,0,.2);
}
html[data-color-mode="dark"] .admin-login-card:before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.08),transparent);
}
html[data-color-mode="dark"] .admin-login-card h2,
html[data-color-mode="dark"] .admin-login-card label>span,
html[data-color-mode="dark"] .admin-login-card .login-remember strong{
  color:#f2f6fb!important;
}
html[data-color-mode="dark"] .admin-login-card>div>p,
html[data-color-mode="dark"] .admin-login-card .login-remember small,
html[data-color-mode="dark"] .admin-login-card .login-back{
  color:#93a4b8!important;
}
html[data-color-mode="dark"] .admin-login-card input{
  background:#0a131e!important;
  border:1px solid #2b3c4f!important;
  color:#f2f6fb!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.018);
}
html[data-color-mode="dark"] .admin-login-card input:hover{
  border-color:#3a4d61!important;
}
html[data-color-mode="dark"] .admin-login-card input:-webkit-autofill,
html[data-color-mode="dark"] .admin-login-card input:-webkit-autofill:hover,
html[data-color-mode="dark"] .admin-login-card input:-webkit-autofill:focus{
  -webkit-text-fill-color:#f2f6fb;
  -webkit-box-shadow:0 0 0 1000px #0a131e inset;
  caret-color:#f2f6fb;
  transition:background-color 9999s ease-out 0s;
}
html[data-color-mode="dark"] .admin-login-card .login-remember{
  background:#111d2a!important;
  border-color:#2b3c4f!important;
}
html[data-color-mode="dark"] .admin-login-card .login-remember:hover{
  background:#152230!important;
  border-color:#3a4d61!important;
}
html[data-color-mode="dark"] .admin-login-card .login-remember>span{
  background:#09121c!important;
  border-color:#405369!important;
}
html[data-color-mode="dark"] .admin-login-card .login-remember>input:checked+span{
  background:var(--accent)!important;
  border-color:var(--accent)!important;
}
html[data-color-mode="dark"] .admin-login-card .button-primary{
  box-shadow:0 12px 30px rgba(var(--accent-rgb),.22);
}
html[data-color-mode="dark"] .admin-login-card .login-back:hover{
  color:#dce6f1!important;
}
html[data-color-mode="dark"] .admin-login-color-toggle{
  border-color:#2b3c4f;
  background:rgba(12,22,33,.78);
  color:#a9b8c8;
  box-shadow:0 12px 30px rgba(0,0,0,.22);
}

/* Native oxide-dark Skin plus gezielte Korrekturen für Toolbar, Menüs und Statuszeile. */
html[data-color-mode="dark"] .tox.tox-tinymce{
  overflow:hidden;
  background:#0b131d!important;
  border:1px solid #2b3c4f!important;
  border-radius:10px!important;
  box-shadow:none!important;
}
html[data-color-mode="dark"] .reply-composer .tox.tox-tinymce{
  border-width:1px 0 0!important;
  border-radius:0!important;
}
html[data-color-mode="dark"] .tox .tox-editor-header{
  background:#121d2a!important;
  border-bottom:1px solid #2b3c4f!important;
  box-shadow:none!important;
}
html[data-color-mode="dark"] .tox .tox-menubar,
html[data-color-mode="dark"] .tox .tox-toolbar-overlord,
html[data-color-mode="dark"] .tox .tox-toolbar,
html[data-color-mode="dark"] .tox .tox-toolbar__overflow,
html[data-color-mode="dark"] .tox .tox-toolbar__primary,
html[data-color-mode="dark"] .tox .tox-statusbar{
  background:#121d2a!important;
}
html[data-color-mode="dark"] .tox .tox-toolbar__group{
  border-color:#2b3c4f!important;
}
html[data-color-mode="dark"] .tox .tox-tbtn,
html[data-color-mode="dark"] .tox .tox-mbtn{
  background:transparent!important;
  color:#dce6f1!important;
}
html[data-color-mode="dark"] .tox .tox-tbtn:hover,
html[data-color-mode="dark"] .tox .tox-tbtn:focus,
html[data-color-mode="dark"] .tox .tox-mbtn:hover,
html[data-color-mode="dark"] .tox .tox-mbtn:focus,
html[data-color-mode="dark"] .tox .tox-tbtn--enabled,
html[data-color-mode="dark"] .tox .tox-tbtn--enabled:hover,
html[data-color-mode="dark"] .tox .tox-mbtn--active{
  background:#223247!important;
  color:#fff!important;
}
html[data-color-mode="dark"] .tox .tox-tbtn--disabled,
html[data-color-mode="dark"] .tox .tox-tbtn--disabled:hover{
  background:transparent!important;
  opacity:.42;
}
html[data-color-mode="dark"] .tox .tox-tbtn svg,
html[data-color-mode="dark"] .tox .tox-mbtn svg,
html[data-color-mode="dark"] .tox .tox-statusbar svg{
  fill:#dce6f1!important;
}
html[data-color-mode="dark"] .tox .tox-mbtn__select-label,
html[data-color-mode="dark"] .tox .tox-statusbar__path-item,
html[data-color-mode="dark"] .tox .tox-statusbar__wordcount,
html[data-color-mode="dark"] .tox .tox-statusbar__branding{
  color:#aebccc!important;
}
html[data-color-mode="dark"] .tox .tox-statusbar{
  border-top:1px solid #2b3c4f!important;
  color:#aebccc!important;
}
html[data-color-mode="dark"] .tox .tox-edit-area:before{
  border-color:var(--accent)!important;
}
html[data-color-mode="dark"] .tox .tox-edit-area__iframe{
  background:#0b131d!important;
}
html[data-color-mode="dark"] .tox .tox-collection,
html[data-color-mode="dark"] .tox .tox-menu,
html[data-color-mode="dark"] .tox .tox-dialog,
html[data-color-mode="dark"] .tox .tox-dialog__header,
html[data-color-mode="dark"] .tox .tox-dialog__content-js,
html[data-color-mode="dark"] .tox .tox-dialog__body,
html[data-color-mode="dark"] .tox .tox-dialog__footer,
html[data-color-mode="dark"] .tox .tox-pop{
  background:#111b27!important;
  border-color:#2b3c4f!important;
  color:#edf3fa!important;
}
html[data-color-mode="dark"] .tox .tox-collection__group{
  background:#111b27!important;
  border-color:#2b3c4f!important;
}
html[data-color-mode="dark"] .tox .tox-collection__item{
  color:#dce6f1!important;
}
html[data-color-mode="dark"] .tox .tox-collection__item:hover,
html[data-color-mode="dark"] .tox .tox-collection__item--active,
html[data-color-mode="dark"] .tox .tox-collection__item--enabled{
  background:#223247!important;
  color:#fff!important;
}
html[data-color-mode="dark"] .tox .tox-collection__item-accessory,
html[data-color-mode="dark"] .tox .tox-collection__item-checkmark svg{
  color:#aebccc!important;
  fill:#aebccc!important;
}
html[data-color-mode="dark"] .tox .tox-label,
html[data-color-mode="dark"] .tox .tox-dialog__title,
html[data-color-mode="dark"] .tox .tox-form__group label,
html[data-color-mode="dark"] .tox .tox-checkbox__label{
  color:#edf3fa!important;
}
html[data-color-mode="dark"] .tox .tox-textfield,
html[data-color-mode="dark"] .tox .tox-textarea,
html[data-color-mode="dark"] .tox .tox-listboxfield .tox-listbox--select,
html[data-color-mode="dark"] .tox .tox-selectfield select{
  background:#0a131e!important;
  border-color:#2b3c4f!important;
  color:#edf3fa!important;
}
html[data-color-mode="dark"] .tox .tox-checkbox__icons .tox-icon svg{
  fill:#dce6f1!important;
}
html[data-color-mode="dark"] .tox .tox-notification{
  background:#172536!important;
  border-color:#33475d!important;
  color:#edf3fa!important;
}
html[data-color-mode="dark"] .tox .tox-throbber{
  background:rgba(7,13,20,.76)!important;
}

@media(max-width:900px){
  html[data-color-mode="dark"] .admin-login-visual{
    min-height:390px;
    border-right:0;
    border-bottom:1px solid rgba(147,164,184,.14);
  }
  html[data-color-mode="dark"] .login-security{width:100%}
  html[data-color-mode="dark"] .admin-login-card{border-left:0!important;box-shadow:none}
}

/* v1.0.37: Kundenantwort-Bestätigung im Darkmode */
html[data-color-mode="dark"] .ticket-customer-ack-action,
html[data-color-mode="dark"] .ticket-acknowledgement{
  background:linear-gradient(135deg,rgba(31,138,112,.13),rgba(20,39,56,.82));
  border-color:rgba(73,183,151,.28);
  box-shadow:none;
}
html[data-color-mode="dark"] .ticket-customer-ack-icon,
html[data-color-mode="dark"] .ticket-acknowledgement-icon{
  background:rgba(31,138,112,.16);
  border-color:rgba(73,183,151,.27);
  color:#65d0b0;
}
html[data-color-mode="dark"] .ticket-customer-ack-action .button{
  background:rgba(31,138,112,.12);
  border-color:rgba(73,183,151,.3);
  color:#88ddc4;
}
html[data-color-mode="dark"] .ticket-customer-ack-action .button:hover{background:#1f8a70;color:#fff}
html[data-color-mode="dark"] .ticket-acknowledgement-copy>small b{color:#65d0b0}
html[data-color-mode="dark"] .ticket-public-acknowledgement{
  background:linear-gradient(135deg,rgba(31,138,112,.14),rgba(18,37,54,.92));
  border-color:rgba(73,183,151,.28);
}
html[data-color-mode="dark"] .ticket-public-ack-icon{
  background:rgba(31,138,112,.16);
  border-color:rgba(73,183,151,.28);
  color:#65d0b0;
}

/* v1.0.38: Inline-Bestätigung unter Kundenantwort */
html[data-color-mode="dark"] .ticket-customer-ack-inline .ticket-customer-ack-action{
  background:linear-gradient(135deg,rgba(31,138,112,.15),rgba(15,31,46,.96));
}
html[data-color-mode="dark"] .ticket-customer-ack-alternative{color:#aebdca}
html[data-color-mode="dark"] .ticket-customer-ack-alternative .icon{color:#7ed8bd}


/* v1.0.47: Wartungsmodus */
html[data-color-mode="dark"] .maintenance-body{background:radial-gradient(circle at 18% 12%,rgba(var(--accent-rgb),.12),transparent 31%),linear-gradient(145deg,#08111b,#0d1824);color:#edf3fa}.maintenance-body[data-color-mode="dark"]{background:#0d1824}html[data-color-mode="dark"] .maintenance-card{background:rgba(13,24,36,.92);border-color:#26384a;box-shadow:0 30px 90px rgba(0,0,0,.38)}html[data-color-mode="dark"] .maintenance-card h1,html[data-color-mode="dark"] .maintenance-brand strong,html[data-color-mode="dark"] .maintenance-status strong{color:#edf3fa}html[data-color-mode="dark"] .maintenance-card>p,html[data-color-mode="dark"] .maintenance-brand small,html[data-color-mode="dark"] .maintenance-status small,html[data-color-mode="dark"] .maintenance-card footer{color:#9fb0c2}html[data-color-mode="dark"] .maintenance-status{background:rgba(30,49,67,.72);border-color:#30465b}html[data-color-mode="dark"] .maintenance-status-dot{border-color:#0d1824}html[data-color-mode="dark"] .maintenance-mode-toggle.is-active{color:#ff9a90;background:rgba(216,87,74,.10);border-color:rgba(232,108,96,.30)}
