:root {
    --bg-main: #1e1f22;
    --bg-sidebar: #111214;
    --bg-card: #2b2d31;
    --text-main: #dbdee1;
    --text-muted: #949ba4;
    --accent: #5865F2;
    --success: #2ecc71;
    --warning: #f1c40f;
    --danger: #ed4245;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
}

/* Layout */
.dashboard-body {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-header h2 { font-size: 20px; color: #fff; }
.sidebar-header p { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.sidebar-nav {
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.nav-link {
    display: block;
    padding: 10px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.05);
    color: #fff;
}

.nav-link.active {
    background-color: rgba(88, 101, 242, 0.15);
    color: var(--accent);
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px 40px;
}

/* Utilities (Tailwind like) */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.items-center { align-items: center; }
.gap-20 { gap: 20px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-30 { margin-top: 30px; }
.p-20 { padding: 20px; }
.py-20 { padding-top: 20px; padding-bottom: 20px; }
.py-40 { padding-top: 40px; padding-bottom: 40px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-lg { font-size: 1.1rem; line-height: 1.6; }
.border-0 { border: none !important; }
.h-full { height: 100%; }
.card { background-color: var(--bg-card); border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.avatar-lg { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.badge { padding: 4px 10px; border-radius: 20px; font-size: 13px; font-weight: 600; display: inline-block; }
.badge-pulse { background-color: rgba(237, 66, 69, 0.2); color: var(--danger); animation: pulse 2s infinite; }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Rest of the original CSS... */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
}

/* Extra UI Elements */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
}

.live-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.countdown-timer {
    display: flex;
    gap: 10px;
}

.timer-box {
    background: rgba(255,255,255,0.05);
    padding: 10px 15px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.timer-box span {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.timer-box small {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
}

.progress-item {
    margin-bottom: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 6px;
    transition: width 1s ease-in-out;
}

.activity-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.hidden { display: none; }

.modal-container {
    background: var(--bg-card);
    width: 90%;
    max-width: 500px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
}

.btn-close:hover { color: #fff; }

.modal-content {
    overflow-y: auto;
    margin-top: 10px;
}

/* Utilities */
.rounded-lg { border-radius: 8px !important; }
.rounded-xl { border-radius: 12px !important; }
.rounded-2xl { border-radius: 16px !important; }
.rounded-full { border-radius: 50% !important; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2) !important; }
.overflow-hidden { overflow: hidden !important; }
.p-0 { padding: 0 !important; }
.p-40 { padding: 40px !important; }
.w-full { width: 100% !important; }
.h-full { height: 100% !important; }
.hidden { display: none !important; }
.flex-1 { flex: 1; }
.justify-center { justify-content: center; }
.flex-col { flex-direction: column; }
.bg-main { background-color: var(--bg-main); }
.mt-2 { margin-top: 0.5rem; }
.pointer-events-none { pointer-events: none !important; }
.pointer-events-auto { pointer-events: auto !important; }

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.right-0 { right: 0 !important; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-toast { z-index: 9999; }

/* Transitions & Animations */
.transition-opacity { transition-property: opacity; }
.transition-transform { transition-property: transform; }
.transition-all { transition-property: all; }
.duration-500 { transition-duration: 500ms; }
.duration-300 { transition-duration: 300ms; }
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }
.transform { transform: translate(0,0); }
.scale-95 { transform: scale(0.95); }
.scale-100 { transform: scale(1); }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* Dropdown */
.dropdown-item {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    transition: 0.2s;
}
.dropdown-item:hover {
    background: rgba(255,255,255,0.05);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    background: var(--bg-card);
    border-left: 4px solid var(--success);
    color: #fff;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateX(0);
}

.btn { 
    padding: 8px 16px; 
    border-radius: 6px; 
    font-weight: 500; 
    cursor: pointer; 
    border: none; 
    transition: 0.2s;
    text-decoration: none;
    font-size: 14px;
}
.btn-secondary { background: rgba(255,255,255,0.1); color: #fff; }
.btn-secondary:hover { background: rgba(255,255,255,0.2); }
.btn-primary { background: #5865F2; color: #fff; }
.btn-primary:hover { background: #4752C4; }
.btn-danger { background: rgba(237, 66, 69, 0.2); color: #ed4245; border: 1px solid rgba(237, 66, 69, 0.3); }
.btn-danger:hover { background: #ed4245; color: #fff; }
.btn-success { background: rgba(46, 204, 113, 0.2); color: #2ecc71; border: 1px solid rgba(46, 204, 113, 0.3); }
.btn-success:hover { background: #2ecc71; color: #fff; }

.hover-bg-light:hover { background: rgba(255,255,255,0.05); }
.cursor-pointer { cursor: pointer; }

/* Login */
.login-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-main); /* #1e1f22 */
}

.login-box {
    background-color: var(--bg-card); /* #2b2d31 */
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-main);
    border: 1px solid rgba(255,255,255,0.05);
    color: var(--text-main);
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 14px;
}

.form-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); /* ring focus */
}


.header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    font-size: 28px;
    color: #fff;
}

.header p {
    color: var(--text-muted);
    margin-top: 5px;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card p {
    font-size: 32px;
    font-weight: 700;
    margin-top: 10px;
    color: #fff;
}

.filters-section {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background-color: #1e1f22;
    color: #fff;
    font-size: 15px;
    outline: none;
}

.search-box .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.filter-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

select, input[type="date"] {
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background-color: #1e1f22;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.logs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.log-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.log-card:hover {
    transform: translateY(-2px);
}

.log-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 15px;
    background-color: #36393f;
    object-fit: cover;
}

.user-info h4 {
    color: #fff;
    font-size: 16px;
}

.user-info p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 2px;
}

.log-action {
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.action-cast {
    background-color: rgba(46, 204, 113, 0.2);
    color: var(--success);
}

.action-change {
    background-color: rgba(241, 196, 15, 0.2);
    color: var(--warning);
}

.vote-details {
    background-color: rgba(0,0,0,0.2);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.vote-old {
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 5px;
    font-size: 14px;
}

.vote-new {
    color: #fff;
    font-weight: 500;
    font-size: 15px;
}

.log-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.election-badge {
    background-color: rgba(255,255,255,0.05);
    padding: 3px 8px;
    border-radius: 12px;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 8px;
}

.page-btn {
    padding: 8px 12px;
    background-color: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--accent);
}

.page-btn.active {
    background-color: var(--accent);
    border-color: var(--accent);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading, .error {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: var(--text-muted);
}

.hidden {
    display: none !important;
}

.error button {
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--accent);
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}
