html, body {
  overscroll-behavior: none;
}

/* Checkbox-Styling für Messungen-Auswahl */
.messung-checkbox {
  transform: scale(1.2);
  cursor: pointer;
}

#selectAll {
  transform: scale(1.3);
  cursor: pointer;
}

.messung-checkbox:hover, #selectAll:hover {
  transform: scale(1.3);
  transition: transform 0.2s ease;
}

/* Auftragsnummer-Validierung Styles */
.validation-message {
  margin-top: 5px;
  font-size: 12px;
  font-weight: bold;
  display: none;
}

.validation-loading {
  color: #666;
}

.validation-error {
  color: #d32f2f;
}

.validation-success {
  color: #2e7d32;
}

input.validation-error {
  border-color: #d32f2f !important;
  box-shadow: 0 0 0 0.2rem rgba(211, 47, 47, 0.25);
}

input.validation-success {
  border-color: #2e7d32 !important;
  box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.25);
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
.close {
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}
	
#notizLogbuch {
  margin-top: 20px;
  max-height: 200px;
  overflow-y: auto;
}
.log-eintrag {
  background: #f9f9f9;
  padding: 10px;
  border-left: 4px solid #04AA6D;
  margin-bottom: 10px;
  font-size: 0.95rem;
  white-space: pre-wrap;
}
	

.max-200-table .resp-table-row > .table-body-cell:first-child {
  max-width: 130px;
  width: 130px; /* optional: erzwingt feste Breite */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/*
input[type="file"] {
  display: none;
}
*/
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  font-size: 1.2em;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #007bff; /* moderne Browser */
}

.footer {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background: #f8f9fa;
	padding: 5px 0;
	box-shadow: 2px 2px 2px rgba(0.1, 0.1, 0.1, 0.1);
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 10px 0;
}

.footer button {
	background: none;
	border: none;
	font-size: 20px;
	margin: 0 20px;
	cursor: pointer;
}

.footer button:active {
	opacity: 0.6;
}

.navbar {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background: #f8f9fa;
	padding: 5px 0;
	box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
}
.navbar table {
	border-collapse: collapse;
}
.navbar td {
	padding: 0 2px;
}
.content {
	margin-top: 45px; /* Platz für fixierte Navigation */
	padding: 5px;
	padding-bottom: 100px; /* Platz für fixierten Footer, damit nichts überlappt */
}

/* Setze die Schriftart für die gesamte Webseite */
body {
    font-family: 'Helvetica', 'Arial'; /* Falls 'Arial' nicht verfügbar ist, wird eine generische sans-serif Schriftart verwendet */
}

.app-shell {
    min-height: 100vh;
    background: #f5f7fb;
}



.login-page {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: linear-gradient(180deg, #0f172a 0%, #1f2937 100%);
    padding: clamp(12px, 2vw, 24px) clamp(16px, 4vw, 32px);
}


.login-wrapper {
    width: min(420px, 100%);
    display: flex;
    justify-content: center;
    margin-top: clamp(8px, 4vw, 24px);
}

.login-card {
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px -24px rgba(15, 23, 42, 0.35);
    padding: clamp(24px, 4vw, 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.login-logo {
    width: 160px;
    height: auto;
    filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.2));
}

.login-title {
    margin: 0;
    font-size: clamp(24px, 5vw, 30px);
    font-weight: 600;
    color: #0f172a;
}

.login-partner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.login-partner-logo {
    max-width: 120px;
    max-height: 40px;
    object-fit: contain;
}

.login-alert {
    background: rgba(220, 38, 38, 0.12);
    color: #991b1b;
    border: 1px solid rgba(248, 113, 113, 0.5);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
}


.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    width: 100%;
}

.form-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    text-align: center;
}

.form-input {
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    padding: 12px 16px;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.login-button {
    width: min(100%, 320px);
    padding: 12px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 12px;
}

.login-info {
    background: #fef9c3;
    border: 1px solid #facc15;
    color: #78350f;
    border-radius: 12px;
    padding: 16px;
    font-size: 14px;
    text-align: center;
    line-height: 1.4;
}

.login-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    font-size: 14px;
}

.login-links a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.login-links a:hover,
.login-links a:focus {
    text-decoration: underline;
}

.login-language {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.login-language form {
    margin: 0;
}

.login-language input[type="image"] {
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
    border: 2px solid transparent;
}

.login-language input[type="image"]:hover,
.login-language input[type="image"]:focus {
    opacity: 1;
    transform: scale(1.1);
    border-color: #2563eb;
}

@media (prefers-reduced-motion: reduce) {
    .login-card {
        transition: none;
    }
    
    .login-language input[type="image"] {
        transition: none;
    }
    
    .login-language input[type="image"]:hover,
    .login-language input[type="image"]:focus {
        transform: none;
    }

    .form-input,
    .login-button {
        transition: none;
    }
}

.rahmen {
	border: 1px solid black; /* Rahmenstärke, -stil und -farbe */
	padding: 5px; /* Innenabstand */
	display: inline-block; /* Damit der Rahmen korrekt angezeigt wird */
}

.custom-file-upload {
  border: 1px solid #ccc;
  display: inline-block;
  padding: 6px 12px;
  cursor: pointer;
}

input.spaltigtextbox {
  width: 120px;	
}
input.messwerte {
  width: 120px;	
}

input[type=text],[type=number],input[type=password], select {
  padding: 12px 20px;
  margin: 8px 0;
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
  width: 200px;
}

div {
 font-size: 16px;	
}

input[type=text]:focus {
  background-color: lightblue;
}
input[type=number]:focus {
  background-color: lightblue;
}


textarea {
  width: 100%;
  height: 150px;
  padding: 12px 20px;
  box-sizing: border-box;
  border: 2px solid #ccc;
  border-radius: 4px;
  background-color: #f8f8f8;
  resize: none;
  font-size: 16px;
}



.button {
background-color: #04AA6D; /* Green */
border: none;
border-radius: 10px;
color: white;
padding: 10px 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
font-weight: bolder;
}

.button:hover {
background-color: #00CC00; /* Green */
color: white;
}

/* The container must be positioned relative: */
.custom-select {
  position: relative;
  font-family: Arial;
}

.custom-select select {
  display: none; /*hide original SELECT element: */
}

.select-selected {
  background-color: DodgerBlue;
}

/* Style the arrow inside the select element: */
.select-selected:after {
  position: absolute;
  content: "";
  top: 14px;
  right: 10px;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-color: #fff transparent transparent transparent;
}

/* Point the arrow upwards when the select box is open (active): */
.select-selected.select-arrow-active:after {
  border-color: transparent transparent #fff transparent;
  top: 7px;
}

/* style the items (options), including the selected item: */
.select-items div,.select-selected {
  color: #ffffff;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent;
  cursor: pointer;
}

/* Style items (options): */
.select-items {
  position: absolute;
  background-color: DodgerBlue;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
}

/* Hide the items when the select box is closed: */
.select-hide {
  display: none;
}

.select-items div:hover, .same-as-selected {
  background-color: rgba(0, 0, 0, 0.1);
}

.resp-table {
	width: 100%;
	display: table;
	border-spacing: 1px;
	
}

.resp-table-caption{
display: table-caption;
text-align: center;
font-size: 20px;
font-weight: bold;
}

.resp-table-header{
display: table-header-group;
background-color: gray;
font-weight: bold;
font-size: 15px;
}

.table-header-cell{
display: table-cell;
padding: 10px;
text-align: justify;
border-bottom: 1px solid black;
	
}

.resp-table-body{
display: table-row-group;
}

.resp-table-row{
display: table-row;

}

.table-body-cell{
	display: table-cell;
	padding: 2px;
	vertical-align: middle;
}

.scroll {
background: #FFFFFF;
height: 400px;
overflow: auto;
overflow-y: auto;
width: 90vw;
border: 1px solid #000;
padding: 10px;
white-space: nowrap;
}


.tooltip {cursor: help;}

/* Aussehen für Tooltip Fenster */
.tooltip span { 
   position: absolute;
   width: 240px;
   color: #000000;
   margin-top: 20px;
   padding: 15px;
   background-color: #FFFFFF;
   border: 1px solid #343434;
   visibility: hidden;z-index:1900; }

/* bei Mauskontakt sichtbar */
.tooltip:hover span { visibility: visible; }


/* Customize the label (the container) */
.container {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 18px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Hide the browser's default radio button */
.container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Create a custom radio button */
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 25px;
  width: 25px;
  background-color: #eee;
  border-radius: 50%;
}

/* On mouse-over, add a grey background color */
.container:hover input ~ .checkmark {
  background-color: #ccc;
}

/* When the radio button is checked, add a blue background */
.container input:checked ~ .checkmark {
  background-color: #2196F3;
}

/* Create the indicator (the dot/circle - hidden when not checked) */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the indicator (dot/circle) when checked */
.container input:checked ~ .checkmark:after {
  display: block;
}

/* Style the indicator (dot/circle) */
.container .checkmark:after {
  top: 9px;
  left: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

.table-auftraege {
  width: 100%;
  border-collapse: collapse;
  font-family: sans-serif;
}
.table-auftraege th,
.table-auftraege td {
  border: 1px solid #ccc;
  padding: 10px;
  vertical-align: middle;
  text-align: center;
}
.table-auftraege thead {
  background-color: #ddd;
}
.table-auftraege tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Hervorhebung für Aufträge vom aktuellen Tag */
.table-auftraege tbody tr.heute {
  background-color: #b6fcb6 !important;
}

/* Hervorhebung für abgeschlossene Aufträge */
.table-auftraege tbody tr.abgeschlossen {
  background-color: #ffebee !important;
}

.table-auftraege tbody tr.abgeschlossen td {
  background-color: #ffebee !important;
}
.icon-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.table-auftraege img {
  max-height: 40px;
}
.messung-buttons {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.messung-buttons button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

@keyframes rowFlashGreen {
  0% { background-color: #b3ffb3; }
  100% { background-color: inherit; }
}
@keyframes rowFlashRed {
  0% { background-color: #ffb3b3; }
  100% { background-color: inherit; }
}
.row-flash-green {
  animation: rowFlashGreen 0.7s linear;
}
.row-flash-red {
  animation: rowFlashRed 0.7s linear;
}

/* Info-Bild-Popup (zentral für alle Info-Icons) */
.info-image-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
}
.info-image-modal.active {
  display: flex;
}
.info-image-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
.info-image-modal-content img {
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 0 20px #000;
  border-radius: 8px;
  display: block;
}
.info-image-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 2.2em;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  background: rgba(0,0,0,0.4);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer-Icons gleich groß und mittig */
.footer-icon {
  width: 35px;
  height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  object-fit: contain;
}

/* ----------- KI-Analyse ----------- */
.ki-analyse-button {
    background-color: #007bff;
    margin-top: 5px;
}
.ki-analyse-button:hover {
    background-color: #0056b3;
}

#ki-result-modal, #ki-analyse-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

#ki-result-modal.show, #ki-analyse-modal.show {
    display: flex;
}

.ki-modal-content, .modal-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.ki-modal-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.ki-modal-bild-container {
    flex: 0 0 400px;
    max-width: 400px;
}

.ki-modal-bild-container img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ki-modal-ergebnis-container {
    flex: 1;
    min-width: 0;
}

.ki-modal-close, .modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
}

.ki-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ki-modal-content table, .modal-content table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

.ki-modal-content th, .ki-modal-content td, .modal-content th, .modal-content td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.ki-modal-content th, .modal-content th {
    background-color: #f2f2f2;
}

/* ----------- Eigenschaften-Typen Design ----------- */
.eigenschaften-typ {
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fafafa;
    transition: all 0.2s ease;
}

.eigenschaften-typ:hover {
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0,123,255,0.1);
}

.eigenschaften-typ summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: #333;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px 6px 0 0;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eigenschaften-typ summary:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
}

.eigenschaften-typ summary::-webkit-details-marker {
    display: none;
}

.eigenschaften-typ summary::after {
    content: '▶';
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
    margin-left: 8px;
}

.eigenschaften-typ[open] summary::after {
    transform: rotate(90deg);
}

.eigenschaften-typ[open] summary {
    border-radius: 6px 6px 0 0;
    border-bottom: 1px solid #e0e0e0;
}

.eigenschaften-content {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    background-color: #fff;
    border-radius: 0 0 6px 6px;
}

.loading-indicator {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Drag & Drop Upload Styles */
.upload-section {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.upload-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.drag-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.drag-drop-zone:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.drag-drop-zone.drag-over {
    border-color: #007bff;
    background-color: #e3f2fd;
    border-style: solid;
}

.drop-content {
    pointer-events: none;
}

.drop-content p {
    margin: 5px 0;
    color: #666;
}

.drop-hint {
    font-size: 12px;
    color: #999;
}

.file-list {
    margin: 15px 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    padding: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.file-item:last-child {
    border-bottom: none;
}

.file-name {
    flex: 1;
    color: #333;
    font-weight: 500;
}

.file-size {
    color: #666;
    margin-left: 10px;
    font-size: 12px;
}

.remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file:hover {
    background: #c82333;
}

.upload-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.upload-button:hover:not(:disabled) {
    background-color: #0056b3;
}

.upload-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}