:root {
    --bg-body: #f4f4f4;
    --bg-card: #ffffff;
    --bg-sidebar: #000000;
    --text-main: #1a1a1a;
    --text-muted: #888888;
    --text-sidebar: #aaaaaa;
    --text-sidebar-hover: #ffffff;
    --border-light: #e0e0e0;
    --border-dark: #333333;
    --accent-hover: #f0f0f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styling */
aside {
    width: 250px;
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    flex-shrink: 0;
}

aside.collapsed {
    width: 70px;
}

.logo-area {
    padding: 24px;
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    border-bottom: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo-text {
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s;
}

aside.collapsed .logo-text {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.toggle-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
}

nav {
    flex: 1;
    padding-top: 20px;
}

nav ul {
    list-style: none;
}

nav li {
    padding: 15px 24px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

nav li:hover, nav li.active {
    background-color: #222;
    color: var(--text-sidebar-hover);
}

nav li span {
    white-space: nowrap;
}

aside.collapsed nav li span {
    display: none;
}

/* Main Content */
main {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

h1 {
    font-weight: 600;
    font-size: 1.5rem;
}

.date-display {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 24px;
    border-radius: 4px; /* Slightly rounded, still sharp */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Dashboard Lower Section */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.section-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 24px;
    border-radius: 4px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Canvas */
.chart-container {
    width: 100%;
    height: 250px;
    position: relative;
}

canvas {
    width: 100%;
    height: 100%;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

th {
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    transition: background 0.1s;
}

th:hover {
    background-color: var(--bg-body);
    color: var(--text-main);
}

tr:hover {
    background-color: var(--accent-hover);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #eee;
    color: #333;
}

.status-badge.critical {
    background: #1a1a1a;
    color: #fff;
}

/* Lists */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.list-item-left {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 500;
}

.item-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    aside {
        position: absolute;
        height: 100%;
        z-index: 100;
        transform: translateX(-100%);
    }
    aside.open {
        transform: translateX(0);
    }
    main {
        padding: 15px;
    }
}s