/* General & Layout */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0; background-color: #f4f7f6; color: #333; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.container { display: flex; flex-grow: 1; width: 100%; overflow: hidden; }
.sidebar { width: 320px; min-width: 300px; background-color: #2c3e50; color: #ecf0f1; padding: 20px; box-shadow: 2px 0 5px rgba(0,0,0,0.1); overflow-y: auto; height: 100%; display: flex; flex-direction: column; }
.sidebar h1 { font-size: 1.5em; text-align: center; margin-bottom: 5px; color: #fff; }
.content { flex-grow: 1; padding: 25px; overflow-y: auto; height: 100%; }
#loggingContainer { height: 350px; min-height: 200px; border-top: 2px solid #ccc; background-color: #e9ecef; overflow-y: hidden; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 10px; }

/* Version Display */
.app-version { text-align: center; font-size: 0.8em; color: #95a5a6; margin-bottom: 20px; }

/* Main Navigation */
.main-nav a { display: block; color: #ecf0f1; text-decoration: none; padding: 12px 15px; margin-bottom: 5px; border-radius: 4px; transition: background-color 0.3s ease; font-weight: 600; }
.main-nav a:hover { background-color: #34495e; }
.main-nav a.active { background-color: #3498db; color: white; }

/* Sidebar Sections */
.sidebar-section { border-top: 1px solid #34495e; padding-top: 20px; margin-top: 20px; }
#auth-hub { display: none; } /* Hide the Authentication Hub */
.sidebar-section h2 { font-size: 1.2em; margin-top: 0; color: #1abc9c; border-bottom: 1px solid #34495e; padding-bottom: 10px; }
.auth-item { margin-bottom: 15px; }
.auth-item label { display: block; margin-bottom: 5px; font-size: 0.9em; font-weight: 600; }
.auth-item input[type=\"text\"], .sidebar-section textarea { width: 100%; padding: 10px; border-radius: 4px; border: 1px solid #7f8c8d; background-color: #34495e; color: #ecf0f1; box-sizing: border-box; font-family: 'Courier New', Courier, monospace; }

/* Main Content Sections */
.page-section { margin-bottom: 30px; padding: 25px; background-color: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.page-section h3 { font-size: 1.5em; color: #2c3e50; margin-top: 0; padding-bottom: 10px; border-bottom: 2px solid #eaecee; }
.api-action { margin-top: 25px; padding-top: 20px; border-top: 1px dashed #bdc3c7; }
.api-action:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.api-action h4 { margin-top: 0; margin-bottom: 15px; font-size: 1.2em; color: #34495e; }
.api-action label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9em; color: #555; }
.api-action input[type=\"text\"], .api-action input[type=\"number\"], .api-action textarea.json-payload { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #bdc3c7; border-radius: 4px; font-family: 'Courier New', Courier, monospace; font-size: 0.9em; box-sizing: border-box; }
.api-action textarea.json-payload { min-height: 120px; resize: vertical; }
.api-action button { background-color: #3498db; color: white; padding: 10px 18px; border: none; border-radius: 4px; cursor: pointer; transition: background-color 0.2s ease; font-size: 0.95em; margin-top: 10px; }
.api-action button.small-btn { padding: 5px 10px; font-size: 0.8em; }
.api-action button:hover { background-color: #2980b9; }
.param-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.response-area { display: none; background-color: #f8f9fa; border: 1px solid #dee2e6; color: #212529; padding: 15px; border-radius: 4px; margin-top: 15px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New', Courier, monospace; font-size: 0.9em; min-height: 40px; }
.response-area:not(:empty) { display: block; }

.api-links { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px dashed #bdc3c7; font-size: 0.9em; }
.api-links a { text-decoration: none; color: #3498db; }
.api-links a:hover { text-decoration: underline; }

/* Table / Grid Styles */
.results-grid {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.results-grid th, .results-grid td {
    border: 1px solid #dfe6e9;
    padding: 8px 12px;
    text-align: left;
    font-size: 0.9em;
}
.results-grid th {
    background-color: #f4f7f6;
    font-weight: 600;
}
.results-grid tbody tr:nth-child(even) {
    background-color: #fbfcfc;
}

/* Logging Area */
.log-panel { height: 100%; display: flex; flex-direction: column; overflow: auto; background: #fff; border: 1px solid #ccc; border-radius: 4px; padding: 10px;}
.log-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 5px; border-bottom: 1px solid #eee;}
.log-header h2 { margin: 0; font-size: 1.1em; color: #333; }
.log-header button { background-color: #95a5a6; padding: 4px 8px; font-size: 0.8em; }
.log-header button:hover { background-color: #7f8c8d; }
.log-area.general-log { background-color: #2b3e50; color: #e0e9f0; padding: 15px; border-radius: 4px; flex-grow: 1; overflow-y: auto; border: 1px solid #4a6572; }
.log-entry span { font-weight: bold; margin-right: 5px; }
.log-ui { color: #1abc9c; }
.log-ocpi { color: #2ecc71; }
.log-error { color: #e74c3c; }
.log-internal-api { color: #3498db; }

/* Kafka Viewer Panel */
.kafka-viewer-container { display: flex; height: 100%; flex-grow: 1; overflow: hidden; }
.topic-list-pane { width: 40%; min-width: 200px; border-right: 1px solid #eaecee; padding: 0; overflow-y: auto; }
.message-view-pane { flex-grow: 1; padding: 0 0 0 10px; overflow-y: auto; display: flex; flex-direction: column; }
#kafka-topic-list { list-style-type: none; padding: 0; margin: 0; }
#kafka-topic-list li { padding: 8px 10px; cursor: pointer; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; font-size: 0.9em; }
#kafka-topic-list li:hover { background-color: #f8f9fa; }
#kafka-topic-list li.active { background-color: #e0eafc; font-weight: 600; }
.message-count-badge { background-color: #3498db; color: white; padding: 2px 8px; border-radius: 10px; font-size: 0.8em; }
#message-display-area, #dlq-message-area { background-color: #2c3e50; color: #ecf0f1; border-radius: 4px; padding: 15px; white-space: pre-wrap; word-break: break-all; flex-grow: 1; font-size: 0.85em; overflow-y: auto; }
#message-view-header { margin: 0 0 10px 0; font-size: 1em;}
