:root {
    --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --sidebar-width: 280px;
    --color-background: #F8F7FA;
    --color-surface: #ffffff;
    --color-primary: #5A40A8;
    --color-primary-light: #EAE6F8;
    --color-primary-text: #3E2D77;
    --color-fatal: #E53935;
    --color-fatal-light: #FFEBEE;
    --color-fatal-text: #C62828;
    --color-suppressed: #757575;
    --color-suppressed-light: #F5F5F5;
    --color-suppressed-text: #616161;
    --color-text-primary: #212121;
    --color-text-secondary: #757575;
    --color-text-tertiary: #BDBDBD;
    --color-border: #EEEEEE;
    --border-radius-lg: 1rem;
    --border-radius-md: 0.5rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-sans);
    margin: 0;
    background-color: var(--color-background);
    color: var(--color-text-primary);
    display: flex;
}

.material-icons {
    vertical-align: middle;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background-color: #211f21;
    padding: 1.5rem;
    overflow-y: auto;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.sidebar-nav {
    flex-grow: 1;
}

.sidebar-section-title {
    color: var(--color-primary-light);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 0 1rem;
}

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

.sidebar li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: var(--border-radius-md);
    text-decoration: none;
    color: var(--color-primary-light);
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    word-break: break-all;
}

.sidebar li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}
.sidebar li a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
}


.sidebar .badge {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.badge-fatal {
    background-color: var(--color-fatal);
    color: white;
}

.sidebar details {
    margin-bottom: 0.25rem;
}

.sidebar summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: var(--border-radius-md);
    color: var(--color-primary-light);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar summary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar details[open] > summary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
}

.sidebar summary::after {
    content: 'expand_more';
    font-family: 'Material Icons';
    font-size: 1.5rem;
    color: var(--color-primary-light);
    transition: transform 0.3s ease;
}

.sidebar details[open] > summary::after {
    transform: rotate(180deg);
}

.sidebar details ul {
    margin-left: 1rem;
}


/* --- Main Content --- */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 2rem 0;
}

.main-content-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 3rem;
}

/* Header */
header {
    margin-bottom: 2rem;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-container {
    width: 50px;
    height: 50px;
    background-color: var(--color-primary-light);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-primary);
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-text-primary);
}

header p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.summary-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.summary-card.fatal {
    border-left: 4px solid var(--color-fatal);
}

.summary-card.suppressed {
    border-left: 4px solid var(--color-suppressed);
}

.summary-card-icon {
    font-size: 2.5rem;
}

.summary-card.fatal .summary-card-icon { color: var(--color-fatal); }
.summary-card.suppressed .summary-card-icon { color: var(--color-suppressed); }

.summary-card-info {
    display: flex;
    flex-direction: column;
}

.summary-card-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.summary-card-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* View Controls & Tabs */
.view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-controls h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-text-secondary);
}

.tabs {
    display: flex;
    background-color: #EAE6F8;
    border-radius: var(--border-radius-md);
    padding: 0.25rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.tab-button.active {
    background-color: var(--color-surface);
    color: var(--color-primary-text);
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
}

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

/* --- Content Cards --- */
.restriction-card {
    background-color: var(--color-surface);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.card-header:hover {
    background-color: #f9f9f9;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-icon-container {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-suppressed-light);
}

.card-icon-container .material-icons {
    color: var(--color-suppressed-text);
    font-size: 24px;
}

.card-header.has-fatal .card-icon-container {
    background-color: var(--color-fatal-light);
}

.card-header.has-fatal .card-icon-container .material-icons {
    color: var(--color-fatal-text);
}


.card-title-text h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.card-title-text p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
}

.card-title-text .info-icon {
    font-size: 1rem;
    margin-right: 0.25rem;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
}

.badge.fatal {
    background-color: var(--color-fatal-light);
    color: var(--color-fatal-text);
}

.badge.suppressed {
    background-color: var(--color-suppressed-light);
    color: var(--color-suppressed-text);
}

.card-toggle-icon {
    font-size: 1.5rem !important;
    color: var(--color-text-tertiary);
    transition: transform 0.3s ease;
}

.card-header.expanded .card-toggle-icon {
    transform: rotate(180deg);
}

.card-body {
    padding: 0 1.5rem 1.5rem;
    display: none; /* Initially hidden */
}

.matches-section.extra-margin-top {
    margin-top: 1rem;
}

.matches-header {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1.5rem;
    color: var(--color-text-secondary);
}

.matches-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.matches-table th,
.matches-table td {
    padding: 0.75rem 0.75rem 0.75rem 0;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    width: 50%;
}

.matches-table th {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.matches-table td {
    font-size: 0.9rem;
    color: var(--color-text-primary);
}

.matches-table .fatal-dependency {
    color: var(--color-text-primary);
    font-weight: 600;
}

.matches-table .suppressed-dependency {
    color: var(--color-text-primary);
    font-weight: 600;
}

.matches-table strong {
    font-weight: 600;
}

.graph-controls {
    margin-bottom: 1.5rem;
}

.graph-controls label {
    font-weight: 600;
    margin-right: 0.5rem;
}

#module-selector {
    padding: 0.5rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
}

#graph-container {
    width: 100%;
    height: 750px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    background-color: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

