body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

.header {
    background: #007bff;
    color: white;
    padding: 20px;
    text-align: center;
}

.tabs {
    display: flex;
    background: #e9ecef;
    border-bottom: 2px solid #dee2e6;
}

.tab {
    padding: 15px 30px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 16px;
    border-right: 1px solid #dee2e6;
    color: #495057;
}

.tab.active {
    background: white;
    border-bottom: 2px solid #007bff;
    color: #007bff;
}

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

.tab-content {
    display: none;
    padding: 20px;
}

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

.status-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
}

.status-running { background-color: #28a745; }
.status-failed { background-color: #dc3545; }
.status-idle { background-color: #ffc107; }
.status-recording { background-color: #dc3545; }
.status-stopped { background-color: #6c757d; }
.status-completed { background-color: #28a745; }
.status-pending { background-color: #17a2b8; }
.status-cancelled { background-color: #6c757d; }

.status-display {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: bold;
}

.controls {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 30px;
}

.three-column {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.control-panel {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-sizing: border-box;
    overflow: hidden;
}

.control-panel h3 {
    margin-top: 0;
    color: #495057;
}

.control-panel h4 {
    margin: 15px 0 10px 0;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
}

select, button, input {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover { background-color: #0056b3; }

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

.btn-danger { background-color: #dc3545; }
.btn-danger:hover { background-color: #c82333; }
.btn-warning { background-color: #ffc107; color: #212529; }
.btn-warning:hover { background-color: #e0a800; }
.btn-success { background-color: #28a745; }
.btn-success:hover { background-color: #218838; }
.btn-info { background-color: #17a2b8; }
.btn-info:hover { background-color: #138496; }

.log-container {
    background: #000;
    color: #00ff00;
    padding: 20px;
    border-radius: 8px;
    height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.loop-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
}

.loop-controls input[type="number"] {
    width: 80px;
    background-color: white;
    cursor: text;
}

.loop-controls input[type="number"]:focus {
    outline: 2px solid #007bff;
    background-color: #fff;
}

.loop-controls input[type="number"]:hover {
    background-color: #f8f9fa;
}

.loop-controls input[type="checkbox"] {
    width: auto;
}

.loop-info {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    font-size: 12px;
}

.modelcheck-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
}

.modelcheck-controls input[type="checkbox"] {
    width: auto;
}

.modelcheck-controls input[type="text"] {
    width: 200px;
}

.modelcheck-info {
    background: #e8f5e8;
    border: 1px solid #28a745;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    font-size: 12px;
}

.modelcheck-status-display {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
}

.modelcheck-results-widget {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.modelcheck-results-widget h4 {
    margin: 0 0 10px 0;
    color: #495057;
}

.proposition-item {
    background: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.proposition-pass {
    border-left-color: #28a745;
    background-color: #d4edda;
}

.proposition-fail {
    border-left-color: #dc3545;
    background-color: #f8d7da;
}

.proposition-error {
    border-left-color: #ffc107;
    background-color: #fff3cd;
}

.proposition-no-data {
    border-left-color: #6c757d;
    background-color: #e9ecef;
}

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

.proposition-title {
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    margin: 0;
}

.proposition-status {
    font-size: 14px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
}

.status-pass { background-color: #28a745; }
.status-fail { background-color: #dc3545; }
.status-error { background-color: #ffc107; color: #212529; }
.status-no-data { background-color: #6c757d; }

.proposition-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.proposition-rationale {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
    font-size: 13px;
    color: #495057;
}

.proposition-rationale strong {
    color: #dc3545;
}

.proposition-formula {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
    font-size: 13px;
    color: #1976d2;
}

.proposition-technical {
    background: #f1f3f4;
    border-radius: 4px;
    padding: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.proposition-technical-toggle {
    display: none; 
}

.proposition-technical-content {
    display: block;
    margin-top: 8px;
}

.proposition-technical-content.show {
    display: block;
}

.group-indicator {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.modelcheck-summary {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.summary-stat {
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    min-width: 80px;
    text-align: center;
}

.summary-stat .value {
    font-size: 18px;
    font-weight: bold;
    display: block;
}

.summary-stat .label {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
}

.bag-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
}

.bag-controls input[type="number"] {
    width: 80px;
    background-color: white;
    cursor: text;
}

.bag-controls input[type="checkbox"] {
    width: auto;
}

.bag-info {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    font-size: 12px;
}

.bag-status-display {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
}

.topics-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    background: white;
}

.topic-checkbox {
    display: block;
    margin: 5px 0;
    font-size: 12px;
}

.topic-checkbox input {
    width: auto;
    margin-right: 8px;
}

.code-editor-container {
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin: 5px 0;
    box-sizing: border-box;
    min-height: 500px;
}

.CodeMirror {
    height: 500px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    border-radius: 4px;
}

.scenario-textarea {
    width: 100%;
    height: 500px;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background-color: #272822;
    color: #f8f8f2;
    resize: vertical;
    display: none;
}

.scenario-search {
    position: relative;
    margin-bottom: 10px;
}

.scenario-search input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.scenario-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.scenario-option {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
}

.scenario-option:hover {
    background-color: #f8f9fa;
}

.scenario-option:last-child {
    border-bottom: none;
}

iframe {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 8px;
}

.collapsible {
    background-color: #f1f1f1;
    color: #444;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 15px;
    margin: 10px 0;
    border-radius: 4px;
}

.collapsible:hover {
    background-color: #ddd;
}

.collapsible-content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: #f9f9f9;
    border-radius: 0 0 4px 4px;
}

.collapsible-content pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 12px;
}

.api-endpoint {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.api-method {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    margin-right: 10px;
}

.method-get { background: #28a745; color: white; }
.method-post { background: #007bff; color: white; }

.api-url {
    font-family: 'Courier New', monospace;
    background: #e9ecef;
    padding: 8px;
    border-radius: 4px;
    display: inline-block;
}

.api-description {
    margin-top: 10px;
    color: #666;
}

.api-params {
    margin-top: 10px;
}

.api-params h4 {
    margin: 10px 0 5px 0;
    color: #495057;
}

.param-list {
    background: #f4f4f4;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.save-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
}

.save-controls input[type="text"] {
    flex: 1;
}

.save-controls button {
    width: auto;
    min-width: 100px;
}

.utility-buttons {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.utility-buttons button {
    flex: 1;
    padding: 8px;
    font-size: 12px;
}

.stored-positions-display {
    background: #e8f5e8;
    border: 1px solid #28a745;
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 15px;
    max-width: 100%;
    box-sizing: border-box;
}

.stored-positions-display h3 {
    margin: 0 0 6px 0;
    color: #155724;
    font-size: 13px;
}

.position-item {
    background: #f8f9fa;
    padding: 6px 8px;
    margin: 3px 0;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    line-height: 1.3;
}

.position-item strong {
    color: #495057;
    font-size: 11px;
}

.no-stored-positions {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 6px;
    font-size: 11px;
}

.clear-positions-btn {
    width: 100%;
    margin-top: 6px;
    padding: 4px;
    font-size: 11px;
}

.running-nodes-display {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 15px;
    max-width: 100%;
    box-sizing: border-box;
}

.running-nodes-display h4 {
    margin: 0 0 6px 0;
    color: #0d47a1;
    font-size: 13px;
}

.node-item {
    background: #f8f9fa;
    padding: 4px 6px;
    margin: 2px 0;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    line-height: 1.2;
    color: #495057;
}

.no-running-nodes {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 6px;
    font-size: 11px;
}

.timing-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    font-size: 12px;
    color: #856404;
}

.safety-grade {
    display: inline-flex;
    gap: 8px;
    margin: 8px 0;
    align-items: center;
}

.grade-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    min-width: 40px;
    text-align: center;
}

.grade-us-a, .grade-eu-1 { background-color: #28a745; color: white; }
.grade-us-b, .grade-eu-2 { background-color: #6c757d; color: white; }
.grade-us-c, .grade-eu-3 { background-color: #ffc107; color: #212529; }
.grade-us-d, .grade-eu-4 { background-color: #fd7e14; color: white; }
.grade-us-f, .grade-eu-5, .grade-eu-6 { background-color: #dc3545; color: white; }

.grade-label {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
