:root {
    --primary-color: #2196F3;
    --danger-color: #f44336;
    --success-color: #4CAF50;
    --warning-color: #ff9800;
    --background-color: #f5f5f5;
    --panel-background: #ffffff;
    --text-color: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.container {
    display: grid;
    grid-template-columns: 300px 1fr 350px;
    gap: 20px;
    height: 100vh;
    padding: 20px;
}

.panel {
    background: var(--panel-background);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
}

/* Left Panel Styles */
.search-container {
    position: relative;
    margin-bottom: 20px;
}

#componentSearch {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
}

.suggestion-item:hover {
    background: #f0f0f0;
}

.selected-components {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.component-tag {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-tag {
    cursor: pointer;
    opacity: 0.8;
}

.delete-tag:hover {
    opacity: 1;
}

/* Center Panel Styles */
#securityMap {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 6px;
}

.node {
    cursor: pointer;
}

.node circle {
    stroke: white;
    stroke-width: 2px;
}

.node text {
    font-size: 12px;
}

.link {
    fill: none;
    stroke: #999;
    stroke-opacity: 0.6;
    stroke-width: 1.5px;
}

/* Right Panel Styles */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: var(--text-color);
}

.tab-btn.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

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

.alert-item {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
}

.alert-item.critical {
    border-left-color: var(--danger-color);
    background: #fff5f5;
}

.alert-item.update {
    border-left-color: var(--warning-color);
    background: #fff9e6;
}

/* Floating Menu Styles */
.floating-menu {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 20px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: translateY(-2px);
}

/* Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    display: none;
}

[data-tooltip]:hover:before {
    display: block;
}

/* Tab Badge */
.tab-btn[data-count]:after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}
