/* 
note:
Dieses style.css ist zu ca. 95% von Claude 3.7 Sonnet generiert worden.
Bin mit dem Ergebnis erstmal ganz zufrieden eigentlich. :)
*/

/* Work Package Selector Styles */
.workpack-selector {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    padding: 4px;
    width: 100%;
    box-sizing: border-box;
}

.workpack-item {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
    gap: 8px;
}

.workpack-item:hover:not(.disabled):not(.selected) {
    background-color: #f0f8ff;
    border-color: #4CAF50;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

.workpack-item.selected {
    background-color: #e8f5e8;
    border-color: #4CAF50;
    color: #2e7d32;
    font-weight: 500;
}

.workpack-item.intermediate {
    background-color: #fff3e0;
    border-color: #ff9800;
    cursor: pointer;
}

.workpack-item.intermediate:hover {
    background-color: #ffe0b2;
    border-color: #f57c00;
}

.workpack-item.intermediate .workpack-name {
    font-weight: 600;
    color: #e65100;
}

.workpack-item.intermediate .intermediate-hours {
    color: #ff9800;
    font-style: italic;
    font-size: 12px;
}

.sub-workpack-selector {
    margin-left: 20px;
    border-left: 3px solid #4CAF50;
    padding-left: 15px;
    margin-top: 8px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 8px 15px;
}

.workpack-item.sub-item {
    margin-bottom: 4px;
    background-color: white;
    border-color: #c8e6c9;
    font-size: 13px;
    padding: 10px 12px;
}

.workpack-item.sub-item:hover:not(.disabled):not(.selected) {
    background-color: #e8f5e8;
    border-color: #4CAF50;
}

.workpack-item.sub-item.selected {
    background-color: #c8e6c9;
    border-color: #2e7d32;
}

.workpack-item.disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

.workpack-item.already-billed {
    background-color: #ffebee;
    border-color: #f44336;
    color: #666;
    position: relative;
}

.workpack-item.already-billed::after {
    content: "Bereits abgerechnet";
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 9px;
    color: #d32f2f;
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 1px 3px;
    border-radius: 2px;
}

.workpack-item .workpack-hours {
    color: #1e3a8a;
    font-weight: bold;
    font-size: 13px;
}

.workpack-item .workpack-phase {
    color: #666;
    font-size: 12px;
    font-weight: normal;
    opacity: 0.8;
    min-width: fit-content;
    white-space: nowrap;
}

.workpack-item .workpack-name {
    flex-grow: 1;
}

/* Scrollbar styling for work package selector */
.workpack-selector::-webkit-scrollbar {
    width: 6px;
}

.workpack-selector::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.workpack-selector::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.workpack-selector::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Export button styles for Lexoffice integration */
.export-actions {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.export-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-button:hover:not(:disabled) {
    background-color: #45a049;
}

.export-button:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
}

.export-button:active:not(:disabled) {
    background-color: #3d8b40;
    transform: translateY(1px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

.container {
    max-width: 1500px; /* Increased from 1000px to 1200px (20% more) */
    margin: 0 auto;
    padding: 0 12px;
}

.header {
    background-color: #2c3e50;
    color: white;
    padding: 12px 15px;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }
  
  .header-left {
    flex: 1;
  }
  
  .header-center {
    flex: 1;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
  }
  
  .header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }
  

  .header h1 {
    font-size: 22px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
  }

.leaf-icon {
    margin-right: 8px;
    vertical-align: middle;
}

.header h1 span {
    font-size: 16px;
    font-weight: normal;
    opacity: 0.9;
    margin-left: 6px;
}

.greenpeak-link {
    color: #4CAF50;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.greenpeak-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.hoai-link {
    color: white;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.hoai-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.header p {
    font-size: 13px;
    color: #ecf0f1;
    margin-left: 28px;
}

/* Section header */
.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0 8px 0;
    width: 100%; /* Ensure full width usage */
}

.section-header select {
    flex: 1;
    max-width: 400px;
    padding: 6px 8px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    background-color: white;
    font-size: 15px;
    font-weight: bold;
}

/* Section title */
.section-title {
    margin: 0;
    font-size: 17px;
    color: #2c3e50;
    white-space: nowrap;
}

.subtitle {
    color: #7f8c8d;
    font-size: 13px;
    margin-bottom: 16px;
}

/* Calculator grid */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    transition: grid-template-columns 0.3s ease;
}

.calculator-column {
    min-width: 280px;
    max-width: 1160px; /* Setting a max-width slightly less than container to ensure proper margins */
}

/* Section boxes */
.section-box {
    background-color: white;
    border: 1px solid #e0e0e0;
    padding: 18px; /* Increased padding for better spacing */
    margin-bottom: 16px; /* Increased margin for better separation */
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08); /* Slightly enhanced shadow */
    width: 100%; /* Ensure full width usage */
}

.section-box h3 {
    color: #2c3e50;
    font-size: 15px;
    margin-bottom: 12px;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 4px;
}

/* Toggle sections */
.toggle-section {
    display: flex;
    align-items: center;
    margin: 10px 0;
    cursor: pointer;
    user-select: none;
}

.toggle-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    color: #27ae60;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.toggle-arrow.active {
    transform: rotate(90deg);
}

.toggle-label {
    color: #34495e;
    font-weight: 500;
    font-size: 14px;
}

.collapsible-section {
    display: none;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-section.active {
    display: block;
}

.haustechnik-info {
    color: black; 
    font-size: 14px; 
    margin-top: 5px;
    padding: 5px;
    line-height: 1.5;
}

.haustechnik-info b {
    font-weight: 500; 
}

.haustechnik-section {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #ecf0f1;
    width: 100%; /* Ensure full width usage */
}

.haustechnik-section h3 {
    color: #2c3e50;
    font-size: 15px;
    margin-bottom: 10px;
}

.haustechnik-section label {
    color: #000 !important;
    font-size: 14px;
}

/* Input groups */
.input-group {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.input-group label {
    flex: 1;
    font-size: 14px;
    color: #34495e;
}

.input-group select {
    flex: 2;
    min-width: 200px;
    padding: 5px 8px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    background-color: white;
    font-size: 14px;
}

.note {
    color: #7f8c8d;
    font-size: 12px;
    font-weight: normal;
}

.input-with-unit {
    display: flex;
    align-items: center;
    width: 140px;
}

.input-with-unit input {
    padding: 5px 8px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    width: 100%;
    transition: border-color 0.2s;
}

.input-with-unit input:focus,
select:focus {
    outline: none;
    border-color: #3498db;
}

select {
    padding: 5px 8px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    width: 100%;
}

.unit {
    margin-left: 5px;
    color: #7f8c8d;
    font-size: 13px;
}

/* Leistungsphasen section */
.leistungsphasen {
    height: 100%;
}

.leistungsphase-row {
    display: flex;
    margin-bottom: 8px;
    align-items: center;
}

.leistungsphase-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
}

.phase-number {
    font-weight: bold;
    color: #2c3e50;
}

.phase-name {
    color: #34495e;
}

.phase-note {
    color: #7f8c8d;
    font-size: 11px;
}

.phase-percent {
    width: 55px;
    display: flex;
    align-items: center;
}

.phase-percent input {
    width: 35px;
    padding: 3px;
    text-align: right;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
}

.phase-result {
    width: 75px;
    text-align: right;
    color: #2c3e50;
    font-weight: 500;
}

/* Summe honorar */
.summe-honorar {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px solid #ecf0f1;
}

.summe-label {
    color: #2c3e50;
}

.summe-value {
    font-size: 16px;
    color: #16a085;
}

/* Action buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.calculate-button, .pdf-button {
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.calculate-button:hover, .pdf-button:hover {
    background-color: #219653;
}

.calculator-icon, .pdf-icon {
    margin-right: 6px;
}

/* Giant calculate button */
.giant-calculate-button {
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 16px 20px;
    margin-top: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.giant-calculate-button:hover {
    background-color: #219653;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.giant-calculate-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.giant-calculate-button .calculator-icon {
    margin-right: 10px;
    font-size: 22px;
}

/* Small add button - compact square button for + symbol */
.small-add-button {
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px;
    margin-top: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.small-add-button:hover {
    background-color: #219653;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.small-add-button:active {
    transform: translateY(0px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.small-add-button .calculator-icon {
    margin: 0;
    font-size: 18px;
}

/* Grouped hours container */
.grouped-hours-container {
    margin-top: 15px;
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
}

.phase-group {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.phase-header {
    background-color: #34495e;
    color: white;
    padding: 8px 12px;
    font-weight: bold;
    font-size: 14px;
    border-radius: 4px 4px 0 0;
}

.arbeitspaket-group {
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.arbeitspaket-group:last-child {
    border-bottom: none;
}

.arbeitspaket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: #2c3e50;
    font-size: 13px;
    margin-bottom: 5px;
}

.arbeitspaket-hours {
    font-weight: bold;
    color: #27ae60;
    margin-right: 10px;
}

.arbeitspaket-totals {
    display: flex;
    gap: 10px;
}

.arbeitspaket-cost {
    font-weight: bold;
    color: #e67e22;
    font-size: 14px;
}

.rate-group {
    margin: 8px 0;
    padding: 8px;
    background-color: #f8f9fa;
    border-left: 3px solid #3498db;
    border-radius: 0 4px 4px 0;
}

.rate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.rate-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 13px;
}

.rate-calculation {
    font-weight: bold;
    color: #8e44ad;
    font-size: 12px;
    font-family: monospace;
}

.grouped-hour-details {
    font-size: 12px;
    color: #7f8c8d;
    margin-left: 10px;
    line-height: 1.3;
}

.time-frame {
    margin-top: 8px;
    padding: 4px 8px;
    background-color: #f0f0f0;
    font-weight: bold;
    color: #2c3e50;
    border-radius: 2px;
    font-size: 11px;
}

/* TYP button styling */
.typ-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
    margin: 0 8px;
    transition: background-color 0.2s ease;
}

.typ-button:hover {
    background-color: #2980b9;
}

.typ-button:active {
    background-color: #1f5f8b;
    transform: translateY(1px);
}

/* Inline type input styling */
.type-input-container {
    margin-top: 8px;
    padding: 8px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.type-input-field {
    flex-grow: 1;
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    font-size: 12px;
    font-family: Arial, sans-serif;
    outline: none;
}

.type-input-field:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.type-confirm-btn, .type-cancel-btn {
    padding: 4px 10px;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.type-confirm-btn {
    background-color: #27ae60;
    color: white;
}

.type-confirm-btn:hover {
    background-color: #229954;
}

.type-cancel-btn {
    background-color: #95a5a6;
    color: white;
}

.type-cancel-btn:hover {
    background-color: #7f8c8d;
}

/* Type display element styling */
.type-display {
    display: inline-block;
    background-color: #e8f5e8;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 3px;
    position: relative;
    font-size: 10px;
    font-weight: bold;
    margin-left: 8px;
    border: 1px solid #4CAF50;
}

.type-display .type-text {
    margin-right: 4px;
}

.type-display .type-remove-btn {
    display: inline-block;
    color: #d32f2f;
    font-weight: bold;
    font-size: 11px;
    cursor: pointer;
    padding: 0 2px;
    margin-left: 2px;
    border-radius: 2px;
    line-height: 1;
    transition: background-color 0.2s ease;
}

.type-display .type-remove-btn:hover {
    background-color: #ffcdd2;
    color: #b71c1c;
}

/* Tab navigation styles */
.tab-navigation {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.tab-button {
    padding: 15px 25px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background-color: #e9ecef;
    color: #495057;
}

.tab-button.active {
    background-color: #fff;
    color: #2c3e50;
    border-bottom-color: #3498db;
    font-weight: 600;
}

/* Tab content styles */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Exporte content styles */
.exporte-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.exporte-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.exporte-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.refresh-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background-color: #f0f0f0;
    border-color: #3498db;
}

.bin-files-container {
    padding: 20px;
}

.bin-files-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bin-file-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.bin-file-item:hover {
    border-color: #3498db;
}

.bin-file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.bin-file-header:hover {
    background-color: #e9ecef;
}

.bin-file-name {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

.bin-file-info {
    color: #6c757d;
    font-size: 12px;
}

.bin-file-toggle {
    color: #3498db;
    font-weight: bold;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.bin-file-content {
    padding: 16px;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
}

.json-content {
    background-color: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
}

.json-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background-color: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}

.json-info {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.copy-json-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s ease;
}

.copy-json-btn:hover {
    background-color: #2980b9;
}

.json-display {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 16px;
    margin: 0;
    font-family: 'Courier New', Monaco, monospace;
    font-size: 12px;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre;
    max-height: 400px;
    overflow-y: auto;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

.no-files {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-style: italic;
}

.error {
    color: #dc3545;
    text-align: center;
    padding: 20px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 10px 0;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dc3545;
    background-color: #f8d7da;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

.error-icon {
    font-size: 16px;
}

.literature {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.affiliate {
    color: #95a5a6;
    font-size: 11px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr !important;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .section-header select {
        width: 100%;
        max-width: none;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .header p {
        font-size: 12px;
    }
}

#zone, #satz, #op-loaded-pojects, #op-loaded-workpacks {
    width: 360px;
    min-width: 360px;
}

/* Work package dropdown styling with dark blue hours */
#op-loaded-workpacks {
    /* Removed fixed width constraint to allow full width usage */
}

#op-loaded-workpacks option span,
#op-loaded-phasen option span {
    color: #1e3a8a !important;
    font-weight: bold !important;
}

/* Hours list styles */
.hours-list-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.hours-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 10px;
    font-weight: bold;
    color: #2c3e50;
    font-size: 18px;
}

.hours-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.hours-item {
    padding: 8px 10px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
}

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

.hours-item input[type="checkbox"] {
    margin-right: 8px;
}

.hours-item label {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
    font-weight: normal;
    flex-wrap: wrap;
}

.hour-date {
    font-size: 12px;
    color: #7f8c8d;
    width: 80px;
}

.hour-description {
    flex: 1;
    font-size: 14px;
    color: #34495e;
    margin: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hour-value {
    font-size: 14px;
    color: #2c3e50;
    font-weight: bold;
    width: 50px;
    text-align: right;
}

.hour-person {
    font-size: 13px;
    color: #8e44ad;
    font-weight: 500;
    margin-left: 10px;
    width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hour-rate-dropdown {
    margin-left: 10px;
    font-size: 13px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    padding: 2px 5px;
    background-color: white;
    color: #34495e;
    width: 180px;
}

.hour-rate-select-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hour-rate-select-group label {
    min-width: 100px;
}

.hour-rate-select-group select {
    flex: 2;
}

.hour-rate-select-group input {
    flex: 1;
    min-width: 80px;
    text-align: right;
}

.delete-hour-rate-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
}

.delete-hour-rate-btn:hover {
    background-color: #c0392b;
}

.hours-loading, .hours-error, .hours-empty {
    padding: 15px;
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}





/* Status Dot */


.status-wrapper {
    display: flex;
    gap: 15px;
  }
  
  .status-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
  }
  
  .status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
  }
  
  .status-green {
    background-color: #4CAF50;
  }
  
  .status-red {
    background-color: #F44336;
  }

  .status-grey {
    background-color: #8f8f8f;
  }
  

  
  .header-dropdown-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
  }

  .header-dropdown {
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    width: 220px;
    cursor: pointer;
    outline: none;
  }

  .header-dropdown:focus {
    border-color: rgba(255, 255, 255, 0.5);
  }

  .header-dropdown option {
    background-color: #2c3e50;
    color: white;
  }

  /* Simple hover effect for all dropdown options */
  .header-dropdown option:hover {
    background-color: rgba(255, 255, 255, 0.2);
  }

  #customer-id {
    margin-top: 0px;
    text-align: center;
    font-size: 0px;
    color: white;
  }

  /* Style for company-dropdown in form section (not in header) */
  .section .header-dropdown,
  #company-dropdown {
    background-color: white;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
    width: 100%;
    max-width: 400px;
  }

  .section .header-dropdown option,
  #company-dropdown option {
    background-color: white;
    color: #2c3e50;
  }

  /* Simple hover effect for form dropdowns */
  .section .header-dropdown option:hover,
  #company-dropdown option:hover {
    background-color: rgba(0, 0, 0, 0.05);
  }

  .hoai-toggle-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
  }

  .hoai-toggle-btn:hover {
    background-color: #219653;
    transform: translateY(-1px);
  }

  .hoai-toggle-btn:active {
    transform: translateY(0px);
  }

  .hoai-toggle-btn.inactive {
    background-color: #95a5a6;
  }

  .hoai-toggle-btn.inactive:hover {
    background-color: #7f8c8d;
  }
  
.status-green {
    background-color: #4CAF50;
  }
  
.status-red {
    background-color: #F44336;
  }

.status-grey {
    background-color: #9E9E9E;
  }
  
.api-status{
    margin-left: 20px;
}




/* Additional CSS for API Management */
.toggle-section {
    cursor: pointer;
    user-select: none;
}

/* Section header with buttons */
.section-header-with-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ecf0f1;
}

.section-header-with-buttons h3 {
    margin: 0;
    padding: 0;
    border-bottom: none;
}

/* Button styles */
.api-save-button {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
    background-color: #27ae60;
}

.api-save-button:hover {
    background-color: #219653;
}

/* Input fields */
#apiSection input[type="text"],
#apiSection select {
    padding: 8px 10px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    width: 100%;
    transition: border-color 0.2s;
    margin-bottom: 10px;
}

#apiSection input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
}

/* Input group without label */
#apiSection .input-group {
    margin-bottom: 10px;
}

/* Toggle arrow animation */
#apiToggle.active {
    transform: rotate(90deg);
}

/* Status messages for API connections */
.haustechnik-info.success {
    color: #27ae60;
    background-color: #e8f5e9;
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
    border: 1px solid #a5d6a7;
}

.haustechnik-info.error {
    color: #e53935;
    background-color: #ffebee;
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
    border: 1px solid #ef9a9a;
}

.haustechnik-info.info {
    color: #2196F3;
    background-color: #E3F2FD;
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
    border: 1px solid #90CAF9;
}

/* Calculation save status */
#calculation-save-status {
    width: 100%;
    margin: 10px 0;
    text-align: center;
    font-weight: 500;
}

/* API section spacing */
#apiSection .haustechnik-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

#apiSection .haustechnik-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Add explicit transition to toggle arrow for smoother animation */
.toggle-arrow {
    transition: transform 0.3s ease;
}

/* For smaller screens */
@media (max-width: 768px) {
    .section-header-with-buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .api-action-buttons {
        width: 100%;
    }
    
    .api-save-button {
        width: 100%;
        justify-content: center;
    }
}

/* ========== ANGEBOTE OFFER CREATION INTERFACE STYLES ========== */

/* Custom styles for offer creation interface */
.form-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.form-content {
    padding: 40px;
}

.section {
    margin-bottom: 40px;
}

.section:last-child {
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 8px;
}

.input-row {
    display: flex;
    gap: 20px;
    margin-bottom: 18px;
    align-items: end;
}

.input-row .input-group {
    flex: 1;
    margin-bottom: 0;
}

.input-row .input-group.full-width {
    flex: 2;
}

.templates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.template-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.template-card:hover {
    border-color: #4CAF50;
    background: #f1f8e9;
}

.template-card.selected {
    border-color: #4CAF50;
    background: #e8f5e8;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.template-card h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.template-card p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.template-sub-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin: 8px 0;
}

.template-sub-card:hover {
    border-color: #4CAF50;
    background: #f1f8e9;
}

.template-sub-card.selected {
    border-color: #4CAF50;
    background: #e8f5e8;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.template-sub-card h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.template-sub-card p {
    margin: 0;
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.phases-container {
    margin-top: 20px;
}

.phase-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.phase-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f1f3f4;
    border-bottom: 1px solid #e9ecef;
    color: #1e3a8a;
    font-weight: bold;
}

.phase-header.active {
    background: #e8f5e8;
    border-bottom-color: #4CAF50;
}

.phase-checkbox {
    margin-right: 15px;
    transform: scale(1.2);
}

.phase-info {
    flex: 1;
}

.phase-number {
    font-weight: 600;
    color: #4CAF50;
    font-size: 14px;
}

.phase-title {
    font-weight: 500;
    color: #333;
    margin: 2px 0;
}

.phase-cost {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin-left: 20px;
}

.work-packages {
    display: none;
    padding: 20px;
    background: white;
}

.work-packages.show {
    display: block;
}

.work-package-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.work-package-name {
    flex: 2;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.work-package-hours {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: right;
    font-size: 14px;
}

.work-package-cost-input {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: right;
    font-size: 14px;
}

.work-package-cost {
    width: 100px;
    text-align: right;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.work-package-delete {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-package-delete:hover {
    background: #c82333;
}

.add-work-package {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    margin-top: 15px;
    cursor: pointer;
    font-size: 14px;
}

.add-work-package:hover {
    background: #218838;
}

.actions {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-display {
    text-align: left;
}

.total-line {
    margin: 5px 0;
    font-size: 16px;
}

.total-line.final {
    font-weight: 600;
    font-size: 18px;
    color: #4CAF50;
    border-top: 1px solid #ddd;
    padding-top: 5px;
    margin-top: 10px;
}

/* Merge with existing .btn styles if they exist, otherwise add new */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Hide number input spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
    font-family: 'Courier New', Monaco, monospace;
    white-space: pre-line;
    font-size: 13px;
    line-height: 1.4;
    border: 1px solid #c3e6cb;
}

/* Work Package Structure Styles */
.work-package-item {
    margin-bottom: 15px;
}

.work-package-main {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.work-package-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.add-nested-work-package {
    background: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-nested-work-package:hover {
    background: #5a6268;
}

.nested-work-packages {
    margin-left: 30px;
    margin-top: 10px;
    border-left: 3px solid #dee2e6;
    padding-left: 20px;
    padding-top: 10px;
    background-color: #f8f9fa;
    border-radius: 0 5px 5px 0;
}

.nested-work-package-item {
    margin-bottom: 10px;
    padding: 8px;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.nested-main {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nested-name {
    font-size: 13px;
}

.nested-hours,
.nested-cost {
    font-size: 13px;
    width: 80px;
}

.nested-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
}

.nested-delete:hover {
    background: #c82333;
}

/* Sub-nested work package styles */
.nested-actions {
    display: flex;
    gap: 6px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.add-sub-nested-work-package {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-sub-nested-work-package:hover {
    background: #138496;
}

.sub-nested-work-packages {
    margin-left: 25px;
    margin-top: 8px;
    border-left: 2px solid #17a2b8;
    padding-left: 15px;
    padding-top: 5px;
    background-color: #e6f7ff;
    border-radius: 0 4px 4px 0;
}

.sub-nested-work-package-item {
    margin-bottom: 8px;
    padding: 6px;
    background-color: white;
    border-radius: 3px;
    border: 1px solid #b3e5fc;
}

.sub-nested-main {
    display: flex;
    gap: 6px;
    align-items: center;
}

.sub-nested-name {
    font-size: 12px;
}

.sub-nested-hours,
.sub-nested-cost {
    font-size: 12px;
    width: 70px;
}

.sub-nested-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 11px;
    cursor: pointer;
}

.sub-nested-delete:hover {
    background: #c82333;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
}

.message {
    display: none;
}







/*Dropdown*/
/* Gear icon and dropdown styles */
.gear-container {
    position: relative;
    margin-right: 20px;
}

.gear-icon {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.gear-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.gear-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    width: 150px;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.gear-dropdown.show {
    display: block;
}

.gear-dropdown ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.gear-dropdown li {
    padding: 0;
    border-bottom: 1px solid #eeeeee;
}

.gear-dropdown li:last-child {
    border-bottom: none;
}

.gear-dropdown a {
    display: block;
    padding: 10px 15px;
    color: #2c3e50;
    text-decoration: none;
    transition: background-color 0.2s;
}

.gear-dropdown a:hover {
    background-color: #f5f5f5;
}

/* Add a small arrow to indicate dropdown */
.gear-dropdown::before {
    content: '';
    position: absolute;
    top: -5px;
    right: 10px;
    width: 10px;
    height: 10px;
    background-color: white;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05);
}

/* Calculations View Styles */
.calculation-count {
    margin-bottom: 15px;
    color: #7f8c8d;
    font-size: 14px;
}

.calculation-item {
    margin-bottom: 15px;
}

.calculation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.calculation-header h3 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
}

.calculation-date {
    color: #7f8c8d;
    font-size: 13px;
}

.calculation-details {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.calculation-params {
    flex: 3;
}

.param-item {
    margin-bottom: 5px;
    display: flex;
}

.param-label {
    font-weight: bold;
    color: #34495e;
    min-width: 100px;
    margin-right: 10px;
    font-size: 14px;
}

.param-value {
    color: #2c3e50;
    font-size: 14px;
}

.calculation-result {
    flex: 1;
    text-align: right;
}

.result-label {
    font-weight: bold;
    color: #34495e;
    margin-right: 10px;
    font-size: 14px;
}

.result-value {
    font-weight: bold;
    color: #27ae60;
    font-size: 16px;
}

.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

.no-data-message {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.no-data-message p {
    color: #6c757d;
    margin: 10px 0;
}