/* css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

h1 {
    color: #333;
    font-size: 2.8em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.2em;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.panel {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-top: 5px solid;
    overflow-y: auto;
    max-height: 700px;
}

#ontology-panel {
    border-color: #4CAF50;
}

#system-panel {
    border-color: #2196F3;
}

#operations-panel {
    border-color: #FF9800;
}

.panel h2 {
    font-size: 1.6em;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.concept-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #4CAF50;
}

.concept-card[data-type="relation"] {
    border-left-color: #2196F3;
}

.concept-card[data-type="property"] {
    border-left-color: #FF9800;
}

.relations {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.relation {
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.85em;
    color: #1976D2;
}

.model-elements table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.model-elements th, .model-elements td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.element-type {
    background: #e0f2f1;
    color: #00695c;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.value-input {
    width: 80px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-simulate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.3s;
    margin-top: 15px;
}

.btn-simulate:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.alert.warning {
    background: #fff3cd;
    border-left: 5px solid #ffc107;
}

.alert.info {
    background: #d1ecf1;
    border-left: 5px solid #17a2b8;
}

.scenario-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.scenario-impact {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.impact {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
}

.impact.positive {
    background: #d4edda;
    color: #155724;
}

.impact.negative {
    background: #f8d7da;
    color: #721c24;
}

.impact.neutral {
    background: #e2e3e5;
    color: #383d41;
}

.insights {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-top: 30px;
}

.insights h3 {
    margin-bottom: 15px;
}

#dynamic-insight {
    font-size: 1.2em;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    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); }
}

@media (max-width: 1200px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .panel {
        max-height: 500px;
    }
}

.add-concept-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.add-concept-form input, 
.add-concept-form select, 
.add-concept-form textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.add-concept-form button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.add-concept-form button:hover {
    background: #45a049;
}