	hr {
		border-top: 1px dotted black; width:  100%;
	}
	.setclear { clear: both; }	
	.body, td, p, h1, h2, a{ 
		font-family: Arial, Helvetica, sans-serif;
		 text-decoration:none;
	}	
.setclear { clear: both; }	
.floatfull {
	 max-width: 100%;
	float: left;
	 width: 72%;
}
.float1 {
	min-width: 48%;
	float: left;
	width: calc(50% - 200px);
}
.float2 {
	float: left;
	##height: 120px;
	min-width: 48%;
	width: calc(48% - 200px);
	margin-left: 10px;
}
.float33P {
	float: left;
	##height: 120px;
	width: 33%;
}
.float8P {
	float: left;
	##height: 120px;
	width: 8%;
}
.float10P {
	float: left;
	##height: 120px;
	width: 10%;
}
.float15P {
	float: left;
	##height: 120px;
	#width: 14%;
	#min-width:170px;
	#margin-left: 10px;
}
.float20P {
	float: left;
	##height: 120px;
	width: 20%;
}
.float25P {
	float: left;
	##height: 120px;
	width: 25%;
}
.float35P {
	float: left;
	##height: 120px;
	width: 35%;
	margin-left:5px;
}
.float35PoM {
	float: left;
	##height: 120px;
	width: 35%;
}
.float45P {
	float: left;
	##height: 120px;
	width: 45%;
}
.float55P {
	float: left;
	##height: 120px;
	width: 54%;
}
.float65P {
	float: left;
	##height: 120px;
	width: 66%;
	margin-left:5px;
}
.float75P {
	float: left;
	##height: 120px;
	width: 73%;
	margin-left:5px;
}
.float85P {
	float: left;
	##height: 120px;
	width: 96%;
}
.float3 {
	float: left;
	##height: 120px;
	width: 82px;
}
.float3r {
	float: right;
	##height: 120px;
	width: 80px;
	margin-right:20px;
}
.float4{
	float: left;
	##height: 120px;
	width: 350px;
	margin-left:10px;
}
.floatArtikel {
	##min-width: 600px;
	float: left;
	width: 79%;  ###calc(95% - 90px);
	padding-left:10px;
}
td {
 # display: inline-block;
}
@media only screen and (max-width: 768px) {
  thead {
    display: none;
  }
  td {
    ##display: block;
  }
  td:before {
    content: attr(data-th);
    display: block;
    font-weight: bold;
  }
  .headtop{
	  font-size:12px;
  }
  .longlable{
	  width : 130px;
	white-space: nowrap;
	  overflow:hidden;
  display:inline-block;
  text-overflow: ellipsis;
  }

.p_item{
	 display:block;
}

}

.mylabel{font-size:11px;position:relative;top:-1px;left:0;color:#596665}.w3-input:not(:valid)~.w3-label{color:#b36761}

.container2 {width: 100%;}
.delete {color:#b36761;font-weight:800;font-size:22px;text-decoration:none;font-family:Arial;}

hr {border-top: 1px dotted black; width:  95%;}
input::placeholder {font-weight:500;font-size:12px;font-family:Arial, Helvetica;padding-left:10px;}
 
.container {
  border-radius: 5px;
 ## background-color:#e6edf5;
  padding: 15px;
  margin:10px;
}

 
 

canvas {
width:750px;
max-width:900px !important;
min-width:640px  ;
min-height:250px  ;
 
margin-left:8px;
margin-right:8px;
 
  border-radius: 5px;
  border: 1px solid #CCCCCC;
  

 

}

.signature-pad--body canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
  
}



select:focus::-ms-value {
  background-color: transparent;
}


.select-wrapper {
  position: relative;
}
.select-wrapper::before {
  #font-family: fontello;
  content: "\f107";
  font-size: 20px;
  position: absolute;
  right: 17px;
  top: 10px;
  color: #fff;
  
   pointer-events: none;
}
select:hover {
	box-shadow:0 8px 16px 0 rgba(0,0,0,0.2),0 6px 22px 0 rgba(0,0,0,0.19)
	}
	
.special-button{
height: 40px;
  line-height: 40px;  border:none; float:right; place-items: center; background-position: center center;  width: 40px;    cursor: pointer; background-color:transparent;
}

.special-button:hover, .portal-btn:hover{
   opacity: 0.75;
  transition: 0.3s;
}

/* Systemweite Farblogik für Adress-/Kontakt-Typen */
.crm-type-supplier,
.address-type-supplier,
.maintenance-type-supplier {
	color: #6d3fb8;
}

.crm-type-supplier-contact,
.address-type-supplier-contact,
.maintenance-type-supplier-contact {
	color: #b83280;
}

/* Moderne Standard-Checkboxen
   Wir lassen echte Switches (.switch / eigene Umschalter) unverändert. */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0 6px 0 0;
  border: 2px solid #9fb4bf;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: transform .12s ease-in-out;
  clip-path: polygon(14% 44%, 0 61%, 41% 100%, 100% 18%, 84% 0, 38% 67%);
  background: #fff;
}

input[type="checkbox"]:checked {
  background: #00a7ed;
  border-color: #00a7ed;
}

input[type="checkbox"]:checked::before {
  transform: scale(1);
}

input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 167, 237, .25);
}

input[type="checkbox"]:disabled {
  opacity: .45;
  cursor: not-allowed;
}

label input[type="checkbox"] {
  margin-top: -2px;
}

/* ===========================
   APP-UI STANDARD
   =========================== */

.app-ui,
.app-ui input,
.app-ui select,
.app-ui textarea,
.app-ui button,
.app-ui a {
  font-family: Arial, Helvetica, sans-serif;
}

.app-ui h1,
.app-ui h2,
.app-ui h3,
.app-ui h4,
.app-ui .app-header-title,
.app-ui .page-title {
  font-weight: 600;
  letter-spacing: .01em;
}

.app-ui label {
  margin-bottom: 5px;
  color: #52616a;
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.15;
}

.app-ui input[type="date"],
.app-ui input[type="time"],
.app-ui input[type="number"],
.app-ui input[type="email"],
.app-ui input[type="text"],
.app-ui input[type="search"],
.app-ui input[type="password"],
.app-ui input[type="datetime-local"],
.app-ui select,
.app-ui textarea {
  box-sizing: border-box;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 10px;
  line-height: 1.25;
  background: #fff;
  color: #1f2937;
}

.app-ui input[type="search"] {
  appearance: none;
  -webkit-appearance: none;
}

.app-ui select {
  padding-top: 0;
  padding-bottom: 0;
}

.app-ui textarea {
  min-height: 92px;
  line-height: 1.35;
  padding-top: 9px;
  padding-bottom: 9px;
}

.app-ui input:focus,
.app-ui select:focus,
.app-ui textarea:focus {
  border-color: #6aa8c8;
  outline: 2px solid rgba(17,55,103,.13);
  outline-offset: 1px;
}

.app-btn,
.order-btn,
.button-primary,
.button-muted,
.button-success,
.button-danger {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  box-sizing: border-box;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  padding: 8px 12px;
  font-family: inherit;
  font-weight: 650;
  line-height: 1.1;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, filter .15s ease, box-shadow .15s ease;
}

.app-btn:hover,
.order-btn:hover,
.button-primary:hover,
.button-muted:hover {
  filter: brightness(.98);
  box-shadow: 0 1px 4px rgba(17,55,103,.12);
}

.app-btn:disabled,
.order-btn:disabled,
.button-primary:disabled,
.button-muted:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

.app-btn-primary,
.order-btn-primary,
.button-primary {
  background: #00a7ed !important;
  border-color: #00a7ed !important;
  color: #fff !important;
}

.app-btn-success,
.order-btn-success,
.button-success {
  background: #166534 !important;
  border-color: #166534 !important;
  color: #fff !important;
}

.app-btn-warning,
.order-btn-warning {
  background: #fff3cd !important;
  border-color: #f0c36d !important;
  color: #664d03 !important;
}

.app-btn-danger,
.order-btn-danger,
.button-danger {
  background: #c40627 !important;
  border-color: #a90520 !important;
  color: #fff !important;
}

.app-btn-neutral,
.order-btn-neutral,
.button-muted {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #1f2937 !important;
}

.app-btn-ghost,
.order-btn-ghost {
  background: transparent !important;
  border-color: #cbd5e1 !important;
  color: #113767 !important;
}

.app-btn-icon,
.order-btn-icon {
  width: 34px;
  min-width: 34px;
  height: 32px;
  min-height: 32px;
  padding: 5px !important;
}

.app-ui table thead th {
  font-size: .76rem;
  line-height: 1.15;
  font-weight: 600;
  color: #52616a;
  letter-spacing: .01em;
}

/* The switch - the box around the slider */
.switch {
  position: relative!important ;
  display: inline-block!important ;
  width: 55px!important ;
  height: 28px!important ;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0!important ;
  width: 0!important ;
  height: 0!important ;
}

/* The slider */
.slider {
  position: absolute!important ;
  cursor: pointer!important ;
  top: 0!important ;
  left: 0!important ;
  right: 0!important ;
  bottom: 0!important ;
  background-color: #ccc!important ;
  -webkit-transition: .4s!important ;
  transition: .4s!important ;
}

.slider:before {
  position: absolute!important ;
  content: ""!important ;
  height: 20px!important ;
  width: 20px!important ;
  left: 4px!important ;
  bottom: 4px!important ;
  background-color: white!important ;
  -webkit-transition: .4s!important ;
  transition: .4s!important ;
}

input:checked + .slider {
  background-color: #00a7ed!important ;
}

input:focus + .slider {
  box-shadow: 0 0 1px #00a7ed!important ;
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px)!important ;
  -ms-transform: translateX(26px)!important ;
  transform: translateX(26px)!important ;
}

/* Rounded sliders */
.slider.round {
  border-radius: 28px!important ;
}

.slider.round:before {
  border-radius: 50%!important ;
}
.Alert {color:#c40627 !important; font-weight:600;}


/* ===========================
   DARK-MODE
   =========================== */

body.theme-dark {
  background-color: #111 !important;
  color: #eee;
}

/* Container */
body.theme-dark .resp-container {
  background-color: #111;
}

/* Karten / Sektionen */
body.theme-dark .card {
  background-color: #1c1c1c;
  border-color: #333;
}

/* Typografie */
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h4,
body.theme-dark label,
body.theme-dark p  {
  color: #e9e9e9;
}
body.multi-select__menu {
	background-color: #222;
}

/* Kopfzeile */
#header.theme-dark{
	background-color: #222;
}


 
body.theme-dark ::-webkit-calendar-picker-indicator {
    filter: invert(1)!important;
}

body.theme-dark input[type="checkbox"] {
  background: #182126;
  border-color: #7eabbf;
}

body.theme-dark input[type="checkbox"]:checked {
  background: #00a7ed;
  border-color: #00a7ed;
}
 
/* Eingabefelder */
body.theme-dark input[type="text"],
body.theme-dark input[type="email"],
body.theme-dark input[type="date"],
body.theme-dark input[type="datetime-local"],
body.theme-dark input[type="time"],
body.theme-dark input[type="number"],
body.theme-dark input[type="password"],
body.theme-dark textarea,
body.theme-dark select , body.theme-dark td , body.theme-dark btn {
  background-color: #222 !important;
  color: #f0f0f0;
  border-color: #7eabbf;
  border-width: thin;
 
}

/* Platzhalter */

body.theme-dark span.note, body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #aaa !important;
}

/* Summe-Stunden-Feld (hat keinen Rahmen) */
body.theme-dark #total {
  background-color: #111;
  color: #fff;
}

/* Tabellen */
body.theme-dark table {
  background-color: #181818;
  color: #eee;
}
body.theme-dark th {
  background-color: #222;
  color: #f5f5f5;
  border-color: #333;
}
body.theme-dark td {
  border-color: #333;
}

body.theme-dark.app-ui label,
body.theme-dark .app-ui label {
  color: #c7d2da;
}

body.theme-dark .app-btn-neutral,
body.theme-dark .order-btn-neutral,
body.theme-dark .button-muted {
  background: #252b30 !important;
  border-color: #475569 !important;
  color: #e5edf3 !important;
}

body.theme-dark .app-btn-ghost,
body.theme-dark .order-btn-ghost {
  background: transparent !important;
  border-color: #475569 !important;
  color: #cfe4ff !important;
}

body.theme-dark .app-btn-primary,
body.theme-dark .order-btn-primary,
body.theme-dark .button-primary {
  background: #00a7ed !important;
  border-color: #00a7ed !important;
  color: #fff !important;
}

body.theme-dark .app-btn-primary:hover,
body.theme-dark .order-btn-primary:hover,
body.theme-dark .button-primary:hover {
  background: #0096d6 !important;
}

body.theme-dark .app-btn-success,
body.theme-dark .order-btn-success,
body.theme-dark .button-success {
  background: #166534 !important;
  border-color: #22c55e !important;
  color: #fff !important;
}

body.theme-dark .app-btn-warning,
body.theme-dark .order-btn-warning {
  background: #3b3218 !important;
  border-color: #9a7b24 !important;
  color: #fde68a !important;
}

body.theme-dark .app-btn-danger,
body.theme-dark .order-btn-danger,
body.theme-dark .button-danger {
  background: #c40627 !important;
  border-color: #e14a61 !important;
  color: #fff !important;
}

body.theme-dark.app-ui table thead th,
body.theme-dark .app-ui table thead th {
  color: #c7d2da;
}

/* Toolbar / Buttons grob */
body.theme-dark .toolbar {
  background-color: #151515;
}

/* W3-Buttons grob invertieren */
body.theme-dark .w3-button {
  background-color: #333 !important;
  color: #f5f5f5 !important;
  border-color: #555 !important;
}

.multi-select__menu, .multi-select__toggle{
	color: #000;
  background-color: #fff !important; 
}

body.theme-dark  .multi-select__menu, .multi-select__toggle{
	color: #fff ;
  background-color: #000 !important; 
}



button.w3-btn.w3-alster {
  background-color: #00a7edff  !important;
  color:#fff;
  border:none;
  font-weight: 600;

body.theme-dark .multi-select__menu, body.theme-dark .multi-select__toggle{
	color: #f0eded;
  background-color: #222 !important; 
}

/* Spezielle Buttons */
body.theme-dark .w3-btn-blue {
  background-color: #00a7edff !important; 
}

body.theme-dark #submit_copy {
  background-color: #6ba162 !important; 
}

 
 .w3-alster {
    ## color: auto ; 
	border: none;
	padding-right: 10px;
	padding-left: 10px;
	min-height: 25px;
 
}
.w3-btn-red, .w3-btn-grey, .onlyred {
    color: #fff !important;
	background-color: #c40627 !important;
	border: none;
	padding-right: 10px;	
	margin-left: 10px;	 
	min-height: 25px;
	

}

input[type="date"], input[type="time"], input[type="number"], input[type="text"], input[type="email"], select {   font-size:.95rem; width:100%; box-sizing:border-box; }

body.theme-dark input[type="date"], body.theme-dark input[type="time"], body.theme-dark input[type="number"], body.theme-dark input[type="text"], body.theme-dark input[type="email"], body.theme-dark select { font-size:.95rem; width:95%; box-sizing:border-box;  color-scheme: dark; }

 
body.theme-dark svg  {
    color:#dd6127;  
}
 
/* Spezielle Buttons */
.w3-btn-red, body.theme-dark .w3-btn-red {
  background-color: #c40627 !important; 
}

/* Objektfoto-Boxen */
body.theme-dark #imagewrapper .box-cell {
  background-color: #191919;
  border-color: #333;
}

/* Opt-In Text nicht zu hell */
body.theme-dark #optinarea {
  color: #ddd;
}

/* Signatur-Bereich */
body.theme-dark #signature-pad {
  background-color: #111;
}

body.theme-dark canvas {
  background-color: #d7d7d7; /* hell lassen, damit das Diagramm gut sichtbar bleibt */
}

body.theme-dark .customer_message {
  background-color: #111;  
}



body.theme-dark #signature-pad canvas {
  background-color: #fff; /* weiß lassen, damit Unterschrift gut sichtbar bleibt */
}


body.theme-dark #signpng {
filter: invert(100%);
}


body.theme-dark canvas{
	filter: invert(80%);
	outline: #e0e0e0 3px solid;
	border-color; #e0e0e0;
}

body.theme-dark #hoursBarChart{
	filter: invert(0%);
	outline: #e0e0e0 3px solid;
	border-color; #e0e0e0;
}
 
/* Toast */
body.theme-dark #as-toast {
  background-color: #222;
  color: #f5f5f5;
}
body.theme-dark #submitter, body.theme-dark #goAS, body.theme-dark  .add_Fahrzeugpauschale, body.theme-dark  .add_Kleinmaterial , body.theme-dark  .add_Wartungset, body.theme-dark  .add_form_field, body.theme-dark  .add_form_MA{
  background-color: #1f7ba6;
  color: #fff;
}

body.theme-dark .ui-menu-item-wrapper{
  background-color: #222;
  color: #fff;
}

/* ==========================================================
   Alsterteam UI-Basis (Opt-in über body.app-ui)
   Felder, Buttons, Karten und Hinweise für neue/modernisierte
   Module. Bestehende Altseiten bleiben ohne app-ui unverändert.
   ========================================================== */
body.app-ui {
  --ui-primary: #113767;
  --ui-primary-soft: rgba(17, 55, 103, .10);
  --ui-border: #d9e1e5;
  --ui-border-strong: #c8d5dc;
  --ui-bg: #f7fdfd;
  --ui-surface: #ffffff;
  --ui-surface-soft: #fbfcfd;
  --ui-text: #20272b;
  --ui-muted: #66737a;
  --ui-success: #145c2b;
  --ui-success-bg: #e8f7ed;
  --ui-success-border: #86c99b;
  --ui-danger: #b10000;
  --ui-danger-bg: #ffecec;
  --ui-danger-border: #f5aca6;
  --ui-warning: #6b4a00;
  --ui-warning-bg: #fff3cd;
  --ui-warning-border: #f0c36d;
  --ui-info: #1e3a8a;
  --ui-info-bg: #dbeafe;
  --ui-info-border: #93c5fd;
  --ui-radius: 12px;
  --ui-radius-sm: 8px;
  --ui-control-height: 40px;
  --ui-shadow: 0 4px 14px rgba(17, 55, 103, .07);
  margin: 0;
  background: var(--ui-bg);
  color: var(--ui-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

body.app-ui *,
body.app-ui *::before,
body.app-ui *::after {
  box-sizing: border-box;
}

body.app-ui .app-shell {
  width: min(100%, 1480px);
  margin: 24px auto 44px;
  padding: 0 18px;
}

body.app-ui .app-workspace {
  width: 100%;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

body.app-ui .ui-card,
body.app-ui .card,
body.app-ui .panel,
body.app-ui .section-box {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  padding: 16px 18px;
  box-shadow: var(--ui-shadow);
}

body.app-ui .ui-section,
body.app-ui .form-section {
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  padding: 14px;
  background: var(--ui-surface-soft);
}

body.app-ui label {
  color: #29343a;
  font-size: .84rem;
  font-weight: 650;
  margin-bottom: 5px;
}

body.app-ui input[type="text"],
body.app-ui input[type="email"],
body.app-ui input[type="search"],
body.app-ui input[type="date"],
body.app-ui input[type="time"],
body.app-ui input[type="number"],
body.app-ui input[type="password"],
body.app-ui input[type="datetime-local"],
body.app-ui select,
body.app-ui textarea,
body.app-ui .w3-input {
  width: 100%;
  min-height: var(--ui-control-height);
  padding: 9px 10px;
  border: 1px solid #ccd4db;
  border-radius: var(--ui-radius-sm);
  background: #fff;
  color: var(--ui-text);
  font: inherit;
  line-height: 1.25;
  box-shadow: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

body.app-ui textarea {
  min-height: 120px;
  resize: vertical;
}

body.app-ui input:focus,
body.app-ui select:focus,
body.app-ui textarea:focus,
body.app-ui .w3-input:focus {
  outline: none;
  border-color: var(--ui-primary);
  box-shadow: 0 0 0 3px var(--ui-primary-soft);
}

body.app-ui input::placeholder,
body.app-ui textarea::placeholder {
  color: #8a99a3;
  font-size: .88rem;
  padding-left: 0;
}

body.app-ui .ui-actions,
body.app-ui .btnrow,
body.app-ui .actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

body.app-ui .ui-btn,
body.app-ui .button-primary,
body.app-ui .button-muted,
body.app-ui .button-success,
body.app-ui .button-danger,
body.app-ui .app-btn,
body.app-ui .order-btn,
body.app-ui .w3-btn {
  min-height: var(--ui-control-height);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  text-decoration: none !important;
  font: inherit;
  font-weight: 650;
  line-height: 1.1;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, opacity .16s ease, transform .08s ease;
}

body.app-ui .ui-btn:hover,
body.app-ui .button-primary:hover,
body.app-ui .button-muted:hover,
body.app-ui .button-success:hover,
body.app-ui .button-danger:hover,
body.app-ui .app-btn:hover,
body.app-ui .order-btn:hover,
body.app-ui .w3-btn:hover {
  opacity: .92;
}

body.app-ui .ui-btn:active,
body.app-ui .button-primary:active,
body.app-ui .button-muted:active,
body.app-ui .button-success:active,
body.app-ui .button-danger:active,
body.app-ui .app-btn:active,
body.app-ui .order-btn:active,
body.app-ui .w3-btn:active {
  transform: translateY(1px);
}

body.app-ui .ui-btn-primary,
body.app-ui .button-primary,
body.app-ui .app-btn-primary,
body.app-ui .order-btn-primary {
  background: #00a7ed !important;
  color: #fff !important;
  border-color: #00a7ed !important;
}

body.app-ui .ui-btn-muted,
body.app-ui .button-muted,
body.app-ui .app-btn-neutral,
body.app-ui .order-btn-neutral,
body.app-ui .w3-btn.w3-light,
body.app-ui .w3-light {
  background: #f8fafc !important;
  color: #1f2937 !important;
  border-color: #cbd5e1 !important;
}

body.app-ui .ui-btn-success,
body.app-ui .button-success,
body.app-ui .app-btn-success,
body.app-ui .order-btn-success {
  background: #166534 !important;
  color: #fff !important;
  border-color: #166534 !important;
}

body.app-ui .ui-btn-danger,
body.app-ui .button-danger,
body.app-ui .app-btn-danger,
body.app-ui .order-btn-danger,
body.app-ui .w3-btn-red,
body.app-ui .onlyred {
  background: #c40627 !important;
  color: #fff !important;
  border-color: #a90520 !important;
}

body.app-ui .app-btn-primary,
body.app-ui .order-btn-primary,
body.app-ui .button-primary {
  background: #00a7ed !important;
  color: #fff !important;
  border-color: #00a7ed !important;
}

body.app-ui .app-btn-success,
body.app-ui .order-btn-success,
body.app-ui .button-success {
  background: #166534 !important;
  color: #fff !important;
  border-color: #166534 !important;
}

body.app-ui .app-btn-warning,
body.app-ui .order-btn-warning {
  background: #fff3cd !important;
  color: #664d03 !important;
  border-color: #f0c36d !important;
}

body.app-ui .app-btn-danger,
body.app-ui .order-btn-danger,
body.app-ui .button-danger {
  background: #c40627 !important;
  color: #fff !important;
  border-color: #a90520 !important;
}

body.app-ui .app-btn-ghost,
body.app-ui .order-btn-ghost {
  background: transparent !important;
  color: #113767 !important;
  border-color: #cbd5e1 !important;
}

body.app-ui .ui-message,
body.app-ui .message,
body.app-ui .alert-success,
body.app-ui .route-feedback-success {
  padding: 10px 12px;
  border-radius: var(--ui-radius-sm);
  margin: 0 0 14px;
  background: var(--ui-success-bg);
  border: 1px solid var(--ui-success-border);
  color: var(--ui-success);
  font-weight: 650;
}

body.app-ui .ui-error,
body.app-ui .error,
body.app-ui .alert-danger,
body.app-ui .route-feedback-error {
  padding: 10px 12px;
  border-radius: var(--ui-radius-sm);
  margin: 0 0 14px;
  background: var(--ui-danger-bg);
  border: 1px solid var(--ui-danger-border);
  color: var(--ui-danger);
  font-weight: 650;
}

body.app-ui .ui-warning,
body.app-ui .route-planning-warning {
  padding: 10px 12px;
  border-radius: var(--ui-radius-sm);
  margin: 10px 0;
  background: var(--ui-warning-bg);
  border: 1px solid var(--ui-warning-border);
  color: var(--ui-warning);
  font-weight: 700;
}

body.app-ui .ui-info {
  padding: 10px 12px;
  border-radius: var(--ui-radius-sm);
  margin: 10px 0;
  background: var(--ui-info-bg);
  border: 1px solid var(--ui-info-border);
  color: var(--ui-info);
}

body.app-ui .small,
body.app-ui .hint,
body.app-ui .note {
  color: var(--ui-muted);
}

body.app-ui table {
  background: #fff;
  border-collapse: collapse;
}

body.app-ui th {
  background: #f6f7f9;
  color: #29343a;
}

body.theme-dark.app-ui {
  --ui-bg: #111;
  --ui-surface: #191919;
  --ui-surface-soft: #151515;
  --ui-text: #eee;
  --ui-muted: #cbd5e1;
  --ui-border: #333;
  --ui-border-strong: #444;
  --ui-primary-soft: rgba(0, 167, 237, .18);
}

body.theme-dark.app-ui input[type="text"],
body.theme-dark.app-ui input[type="email"],
body.theme-dark.app-ui input[type="search"],
body.theme-dark.app-ui input[type="date"],
body.theme-dark.app-ui input[type="time"],
body.theme-dark.app-ui input[type="number"],
body.theme-dark.app-ui input[type="password"],
body.theme-dark.app-ui input[type="datetime-local"],
body.theme-dark.app-ui select,
body.theme-dark.app-ui textarea,
body.theme-dark.app-ui .w3-input {
  background: #222 !important;
  border-color: #444;
  color: #f5f5f5;
  color-scheme: dark;
}

body.theme-dark.app-ui label {
  color: #e5eef5;
}

body.theme-dark.app-ui .app-workspace {
  background: var(--ui-surface);
  border-color: var(--ui-border);
}

@media (max-width: 700px) {
  body.app-ui .app-shell {
    margin-top: 14px;
    padding-left: 10px;
    padding-right: 10px;
  }

  body.app-ui .app-workspace {
    padding: 14px;
    border-radius: 14px;
  }
}

/* ===== Zentrale Ladeanzeige / Retry-Hinweis ===== */
.app-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 55, 103, .18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.app-loading-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.app-loading-card {
  width: min(420px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  color: #24313a;
  border: 1px solid rgba(17, 55, 103, .18);
  box-shadow: 0 18px 50px rgba(17, 55, 103, .26);
  backdrop-filter: blur(8px);
}

.app-loading-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid rgba(17, 55, 103, .14);
  border-top-color: #113767;
  animation: app-loading-spin .8s linear infinite;
}

.app-loading-title {
  color: #113767;
  font-weight: 750;
  font-size: 1rem;
  line-height: 1.25;
}

.app-loading-message {
  margin-top: 3px;
  color: #52616a;
  font-size: .9rem;
  line-height: 1.35;
}

.app-loading-bar {
  position: relative;
  height: 5px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 55, 103, .12);
}

.app-loading-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #113767, #00a7ed);
  animation: app-loading-bar 1.1s ease-in-out infinite;
}

.app-loading-overlay.has-progress .app-loading-bar span {
  animation: none;
  transform: none;
  transition: width .25s ease;
}

.app-loading-progress-text {
  min-height: 1.1em;
  margin-top: 6px;
  color: #52616a;
  font-size: .82rem;
  line-height: 1.25;
}

body.theme-dark .app-loading-overlay {
  background: rgba(0, 0, 0, .46);
}

body.theme-dark .app-loading-card {
  background: rgba(30, 34, 37, .96);
  color: #eef4f7;
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

body.theme-dark .app-loading-spinner {
  border-color: rgba(255, 255, 255, .16);
  border-top-color: #7dd3fc;
}

body.theme-dark .app-loading-title {
  color: #dbeafe;
}

body.theme-dark .app-loading-message {
  color: #cbd5e1;
}

body.theme-dark .app-loading-progress-text {
  color: #cbd5e1;
}

body.theme-dark .app-loading-bar {
  background: rgba(255, 255, 255, .12);
}

@keyframes app-loading-spin {
  to { transform: rotate(360deg); }
}

@keyframes app-loading-bar {
  0% { transform: translateX(-115%); }
  55% { transform: translateX(55%); }
  100% { transform: translateX(245%); }
}

