/* --- Basic Setup & Variables --- */
:root {
    --bg-color: #121212;
    --card-color: #1E1E1E;
    --gold-color: #cca43b;
    --light-gold-color: #e6c77a;
    --text-color: #f0f0f0;
    --text-muted: #888;
    --border-color: #333;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 1200px;
}

/* --- Header & Logo --- */
header {
    padding: 1rem 0 2rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
}

.logo-icon {
    color: var(--gold-color);
    margin-right: 0.5rem;
}

.logo-text-light {
    font-weight: 300;
    opacity: 0.7;
}

/* --- Dashboard Grid Layout --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 24px;
}

/* --- General Card Styling --- */
.card {
    background-color: var(--card-color);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.card h3 {
    margin-bottom: 20px;
    font-weight: 400;
}

/* --- Card 1: Line Chart --- */
.chart-placeholder svg {
    width: 100%;
    height: auto;
}

/* --- Card 2: Security Alerts --- */
.card-alerts {
    position: relative;
}

.alert-list ul, .doughnut-legend {
    list-style: none;
}

.alert-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.alert-list li:last-child {
    border-bottom: none;
}

.data-value {
    color: var(--text-muted);
}

.alert-columns {
    display: flex;
    margin-top: 20px;
    gap: 20px;
}

.alert-columns h4 {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.tooltip {
    position: absolute;
    background-color: var(--gold-color);
    color: var(--bg-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 15px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--gold-color) transparent transparent transparent;
}

/* --- Card 3: Doughnut Chart --- */
.doughnut-chart-container {
    display: flex;
    align-items: center;
    gap: 30px;
    height: 180px;
}

.doughnut-chart {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(
        var(--gold-color) 0% 45%,
        var(--light-gold-color) 45% 70%,
        white 70% 90%,
        #555 90% 100%
    );
    position: relative;
}

.doughnut-chart::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background-color: var(--card-color);
    border-radius: 50%;
}

.doughnut-legend li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
}
.dot.gold { background-color: var(--gold-color); }
.dot.light-gold { background-color: var(--light-gold-color); }
.dot.white { background-color: white; }
.dot.grey { background-color: #555; }


/* --- Card 4: Bar Chart --- */
.bar-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 180px;
    width: 100%;
}

.bar-group {
    display: flex;
    gap: 4px;
    align-items: flex-end;
}

.bar {
    width: 12px;
    background-color: #fff;
    border-radius: 3px 3px 0 0;
}

.bar.gold {
    background-color: var(--gold-color);
}


/* --- Responsive Design --- */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
/* Add this at the end of your style.css file */

.chart-container {
    position: relative;
    height: 250px; /* Give the container a defined height */
}

.doughnut-container {
    height: 200px;
    width: 200px;
    margin: 0 auto; /* Center the doughnut chart */
}
