:root {
    --primary-color: #004d99;
    --secondary-color: #003366;
    --text-color: #333;
    --light-text: #fff;
    --sidebar-width: 250px;
    --header-height: 60px;
    --danger: #d9534f;
    --warning: #f0ad4e;
    --success: #5cb85c;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.top-bar {
    height: var(--header-height);
    background-color: var(--primary-color);
    color: var(--light-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
}

.status-ok {
    color: #8eff8e;
    font-weight: bold;
}

/* Layout */
.container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--secondary-color);
    color: var(--light-text);
    overflow-y: auto;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background 0.3s;
}

.sidebar li:hover, .sidebar li.active {
    background-color: rgba(255,255,255,0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f4f7f6;
}

h2 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-top: 0;
}

/* Map */
#map {
    height: 400px;
    width: 100%;
    border: 1px solid #ccc;
    margin-bottom: 20px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tbody tr:hover {
    background-color: #e6f7ff; /* Light blue highlight */
    cursor: pointer;
}

th {
    background-color: #eee;
}

/* Alerts */
.alert-box {
    margin-bottom: 15px;
}
.alert {
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    color: white;
}
.alert-high { background-color: var(--danger); }
.alert-info { background-color: var(--primary-color); }

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.risk-score {
    font-size: 2rem;
    color: var(--success);
    font-weight: bold;
}

/* Forms */
.form-group {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}
.form-group label {
    display: block;
    margin-bottom: 10px;
}
.form-group input {
    width: 300px;
    padding: 8px;
    margin-left: 10px;
}
button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
}
button:hover {
    background-color: var(--secondary-color);
}
