:root[data-theme="light"] {
    --bg-main: #f7fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #1a365d;
    --sidebar-txt: #e2e8f0;
    --sidebar-active: #2b6cb0;
    --text-main: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --banner-bg: #edf2f7;
    --banner-txt: #2c5282;
}
:root[data-theme="dark"] {
    --bg-main: #1a202c;
    --bg-card: #2d3748;
    --bg-sidebar: #111827;
    --sidebar-txt: #9ca3af;
    --sidebar-active: #3b82f6;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --border-color: #4a5568;
    --banner-bg: #374151;
    --banner-txt: #60a5fa;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { display: flex; height: 100vh; background-color: var(--bg-main); color: var(--text-main); overflow: hidden; }

/* Sidebar Layout */
.sidebar { width: 260px; background-color: var(--bg-sidebar); color: var(--sidebar-txt); display: flex; flex-direction: column; }
.sidebar-header { padding: 20px; font-weight: bold; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 1.1rem; }
.sidebar-menu { list-style: none; padding: 15px 0; overflow-y: auto; flex-grow: 1; }
.menu-item { padding: 12px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.2s; }
.menu-item:hover { background-color: rgba(255,255,255,0.05); }
.menu-item.active { background-color: var(--sidebar-active); color: #ffffff; font-weight: bold; }

/* Theme Toggle & Clock Panel */
.sidebar-footer { padding: 15px; border-top: 1px solid rgba(255,255,255,0.1); }
.toggle-btn { width: 100%; padding: 10px; border: none; border-radius: 4px; background: rgba(255,255,255,0.1); color: #fff; cursor: pointer; font-weight: 600; }
.refresh-notice { font-size: 0.75rem; text-align: center; color: var(--sidebar-txt); opacity: 0.7; margin-top: 8px; }

/* Main Workspace Content */
.main-content { flex-grow: 1; padding: 25px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }
.content-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--border-color); padding-bottom: 15px; }

/* Metric Cards & Layout Blocks */
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.card { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 6px; padding: 15px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.card-title { font-size: 0.85rem; color: var(--text-muted); font-weight: bold; text-transform: uppercase; margin-bottom: 5px; }
.card-value { font-size: 1.5rem; font-weight: bold; color: var(--text-main); }

/* Tables & Matrix Views */
table { width: 100%; border-collapse: collapse; margin-top: 10px; background: var(--bg-card); }
th, td { padding: 10px 12px; text-align: left; border: 1px solid var(--border-color); font-size: 0.9rem; }
th { background-color: var(--banner-bg); color: var(--banner-txt); font-weight: bold; }

/* Status Badges */
.status-pass { background-color: #d4edd2 !important; color: #155724 !important; font-weight: bold; padding: 2px 6px; border-radius: 4px; text-align: center; }
.status-fail { background-color: #f8d7da !important; color: #721c24 !important; font-weight: bold; padding: 2px 6px; border-radius: 4px; text-align: center; }
.status-warn { background-color: #fff3cd !important; color: #856404 !important; font-weight: bold; padding: 2px 6px; border-radius: 4px; text-align: center; }
.status-na { background-color: #e2e3e5 !important; color: #383d41 !important; padding: 2px 6px; border-radius: 4px; text-align: center; }

/* Sidebar Logo Alignment & Scaling */
.sidebar-logo-container {
    padding: 10px 20px 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.15); /* Adds subtle contrast behind the logo */
}

.sidebar-logo-img {
    max-width: 100%;
    height: auto;
    max-height: 80px; /* Keeps the logo neat and constrained within the panel width */
    object-fit: contain;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.15));
}

/* Optional adjustments to make room for the logo */
.sidebar-header {
    padding: 12px 20px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.8;
}
