/* General Body Styles */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7fa;
    color: #333;
    display: flex;
    min-height: 100vh;
}

/* Main Container for Layout */
.container {
    display: flex;
    width: 100%;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: #fff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0; /* Prevent sidebar from shrinking */
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: #4CAF50; /* Green */
    text-decoration: none;
}

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

.sidebar-nav li {
    margin-bottom: 10px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background-color: #e8f5e9; /* Light green */
    color: #2e7d32; /* Darker green */
}

.sidebar-nav a span {
    margin-right: 10px;
    font-size: 18px;
}

/* Main Content Area */
.content {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto; /* Enable scrolling for content if it overflows */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.header h1 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

.user-profile span {
    font-weight: 600;
    color: #555;
}

/* Widgets Grid */
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.widget-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.widget-card.large {
    grid-column: span 2; /* Occupy two columns for larger cards */
}

.card-icon {
    font-size: 36px;
    margin-bottom: 15px;
}

.card-content h3 {
    margin-top: 0;
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.card-content p {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
}

.card-footer {
    margin-top: 20px;
    font-size: 13px;
    color: #999;
}

.card-footer span {
    font-weight: 600;
    color: #4CAF50;
}

/* Specific styles for law links grid */
.law-links-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three equal columns */
    gap: 15px; /* Spacing between columns and rows */
}

.law-links-grid li {
    background-color: #e8f5e9; /* Light green background for each item */
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.law-links-grid li a {
    color: #2e7d32; /* Darker green text */
    text-decoration: none;
    font-weight: 600;
    display: block; /* Make the whole area clickable */
}

.law-links-grid li a:hover {
    text-decoration: underline;
}

/* Table styles for finance section */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 10px;
    border: 1px solid #eee;
    text-align: left;
}

th {
    background-color: #f8f8f8;
    font-weight: 600;
}

td.positive {
    color: #28a745;
}

td.negative {
    color: #dc3545;
}

/* Placeholder styles */
.chart-placeholder,
.memo-placeholder,
.gallery-grid-placeholder,
.upload-placeholder,
.gauge-placeholder {
    background-color: #f0f0f0;
    border: 1px dashed #ccc;
    padding: 20px;
    text-align: center;
    color: #888;
    border-radius: 8px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
}

/* Content section visibility */
.content-section {
    display: none; /* Hide all content sections by default */
}

.content-section.active {
    display: block; /* Show only the active content section */
}