/* Google Fonts & Base Reset */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Google Sans', sans-serif;
}

:root {
    --brand-color: #4285F4; /* Primary Brand Color */
    --brand-hover: #3367d6;
    --bg-color: #F7F9FC;
    --card-bg: #FFFFFF;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    
    /* Status Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    display: flex;
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    background: var(--card-bg);
    height: 100vh;
    padding: 20px 15px;
    border-right: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: fixed;
}

.sidebar .logo-details {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-color);
    margin-bottom: 30px;
}

.sidebar .logo-details .icon {
    font-size: 28px;
    margin-right: 10px;
}

.nav-list {
    list-style: none;
}

.nav-list li {
    margin-bottom: 10px;
}

.nav-list li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    transition: 0.3s;
}

.nav-list li a:hover, .nav-list li a.active {
    background: var(--brand-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(66, 133, 244, 0.2);
}

.nav-list li a i {
    font-size: 20px;
    margin-right: 15px;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    padding: 20px 30px;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    padding: 10px 15px;
    border-radius: 8px;
    width: 300px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    margin-left: 10px;
    width: 100%;
    font-size: 14px;
}

.profile-details {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-icon {
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.admin-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Bento Grid Dashboard */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.stat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-card h2 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.card-icon {
    font-size: 40px;
    color: var(--brand-color);
    background: rgba(66, 133, 244, 0.1);
    padding: 15px;
    border-radius: 12px;
}

.highlight-card {
    background: var(--brand-color);
    color: #fff;
}

.highlight-card h3, .highlight-card h2, .highlight-card span {
    color: #fff;
}

.highlight-card .card-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.badge.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* Charts & Tables Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

/* IMPORTANT: Fixed height container to stop recursive chart scaling issues */
.chart-wrapper {
    position: relative;
    height: 300px; 
    width: 100%;
    margin-top: 15px;
}

.table-card h3, .chart-card h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th, .modern-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.modern-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
}

.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status.processing { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.status.rfc { background: rgba(66, 133, 244, 0.1); color: var(--brand-color); }

.btn-action {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-dark);
    transition: 0.3s;
}

.btn-action:hover {
    background: var(--brand-color);
    color: #fff;
    border-color: var(--brand-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid { grid-template-columns: 1fr; }
}