/* Basic reset and global styles */
body, html { 
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #374151;
    color: #ffffff;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* ================== */
/* == SIDEBAR      == */
/* ================== */
.sidebar {
    width: 250px;
    background-color: #1a2533;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0; /* Prevents sidebar from shrinking */
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #334;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.sidebar-links {
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

.sidebar-links li a {
    display: block;
    padding: 15px 30px;
    color: #c0c0c0;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-links li a:hover {
    background-color: #2a3b4f;
    color: #ffffff;
}

/* ================== */
/* == MAIN CONTENT == */
/* ================== */
.main-content {
    flex-grow: 1; /* Takes up remaining space */
    padding: 30px;
    overflow-y: auto; /* Allows content to scroll if needed */
}

.main-content h1 {
    margin-top: 0;
    font-weight: 300;
    font-size: 2.5rem;
    color: #ffffff;
}

.main-content h2 {
    margin-left: 20px;
}

.block-subtitle {
    margin-left: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}
.card {
    background-color: #1F2937;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    height: auto;
    margin-bottom: 24px;
}
.card:hover {
    border-color: #3B82F6;
}
.form-input {
    background-color: #111827;
    border: 1px solid #4B5563;
    border-radius: 0.375rem;
    color: #E5E7EB;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    margin: 10px;
}
.form-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}
.nav-link {
    padding: 0.4rem 0.6rem;
    color: #D1D5DB;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease-in-out;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}
.nav-link:hover {
    color: white;
    background-color: #374151;
}
.nav-active {
    padding: 0.4rem 0.6rem;
    color: white;
    font-weight: 500;
    border-bottom: 2px solid #3B82F6;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}
.btn {
    background-color: #2563EB;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    border: 0;
    cursor: pointer;
    font-size: 0.875rem;
    margin-top: 0;
    margin-bottom: 24px;
    margin-left: 16px;
}
.btn:hover {
    background-color: #1D4ED8;
}
.btn-secondary {
    background-color: #4B5563;
    color: white;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    cursor: pointer;
    font-size: 0.875rem;
}
.btn-secondary:hover {
    background-color: #6B7280;
}
.article-card {
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 12px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    border-color: #3B82F6;
}
.article-image {
    width: 100%;
    height: 130px;
    object-fit: cover;
    background-color: #111827;
    border-bottom: 1px solid #374151;
    flex-shrink: 0;
}
.article-card-body {
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.article-card-body > div:first-child {
     flex-grow: 1;
}
.article-card-body h3 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
    line-height: 1.4;
}
.article-card-body p.text-sm {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}
.article-card-body a[target="_blank"] {
    padding-top: 0.25rem;
}
.homepage-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #374151;
    color: #60A5FA;
}
.hero-card {
    display: grid;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .hero-card { grid-template-columns: repeat(2, 1fr); }
}
.hero-card:hover {
     border-color: #3B82F6;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
}
.hero-card-image-container {
    position: relative;
    height: 180px;
    background-color: #111827;
}
@media (min-width: 768px) {
    .hero-card-image-container { height: auto; min-height: 200px; }
}
.hero-card-image {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-card-content {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}
.hero-card-content > div:first-child {
     flex-grow: 1;
}
.hero-card-category {
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    margin-bottom: 0.5rem;
     display: inline-block; background-color: #3B82F6; color: white; border-radius: 9999px;
    font-weight: 700; text-transform: uppercase;
}
.hero-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}
.hero-card-description {
    color: #9CA3AF;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    line-height: 1.45;
}
.admin-table {
    min-width: 100%;
    font-size: 0.875rem;
    color: #D1D5DB;
}
.admin-table thead {
    background-color: #374151;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #9CA3AF;
}
.admin-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}
.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #374151;
}
.admin-table tbody tr:hover {
    background-color: rgba(55, 65, 81, 0.5);
}
.admin-table tbody tr:last-child td {
     border-bottom: none;
}
.status-badge {
    padding: 0.25rem 0.75rem;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 9999px;
    text-transform: capitalize;
    display: inline-block;
}
.status-approved, .status-enabled { background-color: #059669; color: #D1FAE5; }
.status-pending { background-color: #D97706; color: #FEF3C7; }
.status-rejected, .status-disabled { background-color: #DC2626; color: #FEE2E2; }
.status-info { background-color: #2563EB; color: #DBEAFE; }
.status-debug { background-color: #52525B; color: #E4E4E7; }
.status-warning { background-color: #D97706; color: #FEF3C7; }
.status-error { background-color: #DC2626; color: #FEE2E2; }
.status-critical { background-color: #7f1d1d; color: #FEE2E2; }
.notification-badge {
    position: absolute; top: 0.5rem; right: 0.5rem;
    background-color: #DC2626;
    color: white;
    font-size: 0.75rem; font-weight: bold;
    border-radius: 9999px; height: 1.5rem; width: 1.5rem;
    display: flex; align-items: center; justify-content: center;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
.ticker-container { width: 100%; overflow: hidden; padding: 0.5rem 0; white-space: nowrap; }
.ticker-track { display: inline-block; animation: ticker-scroll 60s linear infinite; }
.ticker-item { display: inline-block; padding: 0 1.5rem; font-size: 0.875rem; color: #cbd5e0; }
@keyframes ticker-scroll { 0% { transform: translateX(0%); } 100% { transform: translateX(-50%); } }

.widget {
    background-color: #1F2937;
    border-radius: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #374151;
    text-align: center;
    display: flex;
    flex-direction: column;
}
.widget-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #60A5FA;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #374151;
    flex-shrink: 0;
}
.widget ul { flex-grow: 1; }
.event-card { padding: 0.75rem; }
.event-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem;}
.event-card ul { space-y: 0; }
.event-card ul li { padding-bottom: 0.25rem; }
.event-card ul li span.font-semibold { font-size: 0.8rem; }
.event-card ul li a, .event-card ul li span:not(.font-semibold) { font-size: 0.8rem; }
.event-card ul li span.text-xs { font-size: 0.7rem; }
.event-card ul li.pt-2 { padding-top: 0.5rem; }
a:focus, button:focus, input:focus, select:focus, textarea:focus { outline: 2px solid #3B82F6; outline-offset: 2px; box-shadow: none; }
*:focus-visible { outline: 2px solid #3B82F6; outline-offset: 2px; }
@media (max-width: 768px) {
    .btn, .btn-secondary { padding: 0.7rem 1.4rem; font-size: 0.9rem;}
    .article-image { height: 110px; }
    .hero-card-title { font-size: 1.15rem; }
    .homepage-section-title { font-size: 1.15rem; margin-bottom: 0.6rem;}
}
main.container > section {
    margin-bottom: 1.75rem;
}
.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.line-clamp-3 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.line-clamp-4 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
