:root {
    --primary-red: #d90429;
    --primary-yellow: #ffcc00;
    --white: #ffffff;
    --dark-bg: #1a1a1a;
    --dark-card: #2a2a2a;
    --dark-text: #f5f5f5;
}

/* Animations */
.fade-in { animation: fadeIn 0.8s ease; }
.slide-up { animation: slideUp 0.8s ease; }
.slide-left { animation: slideLeft 0.8s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideLeft { from { transform: translateX(-40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Login Page */
body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
}

.login-body {
    background: var(--primary-red);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    text-align: center;
}

.login-card {
    background: var(--white);
    padding: 40px;
    width: 420px;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    text-align: center;
}

.logo {
    width: 90px;
    margin-bottom: 20px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
}

.sso-button {
    display: block;
    background: var(--primary-yellow);
    color: black;
    padding: 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    margin-bottom: 20px;
    transition: 0.2s;
}

.sso-button:hover {
    background: #e6b800;
}

.note {
    font-size: 13px;
    color: #777;
}

.footer {
    text-align: center;
    padding: 20px;
    color: #ddd;
    font-size: 14px;
}

/* Dashboard Layout */
.dashboard-body {
    display: flex;
    background: #f5f5f5;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--primary-red);
    color: white;
    padding: 20px;
    height: 100vh;
    position: fixed;
    overflow-y: auto; /* FIX */
}

.sidebar-logo {
    width: 120px;
    margin-bottom: 20px;
}

.profile-box {
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.profile-icon {
    font-size: 40px;
}

.profile-email {
    font-size: 14px;
    margin-top: 8px;
    word-break: break-all;
}

.sidebar-nav .nav-item {
    display: block;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
}

.nav-item.active {
    background: var(--primary-yellow);
    color: black;
}

/* Sidebar Footer (Logout + Dark Mode pinned to bottom) */
.sidebar-footer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
}

.dark-toggle {
    width: 100%;
    padding: 10px;
    background: var(--primary-yellow);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 12px;
}

/* Logout Button */
.logout-btn {
    display: block;
    padding: 12px;
    background: var(--primary-yellow);
    color: black;
    text-align: center;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s;
}

.logout-btn:hover {
    background: #e6b800;
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    margin-left: 280px;
    padding: 40px;
}

.page-title {
    margin-top: 0;
}

.subtext {
    color: #666;
    margin-bottom: 30px;
}

/* Widgets */
.dashboard-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.widget-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 30%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Chart */
.chart-section {
    margin-bottom: 30px;
}

.chart-placeholder {
    background: white;
    height: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
}

/* User List */
.user-list-title {
    margin-top: 20px;
}

.user-list {
    list-style: none;
    padding: 0;
}

.user-list li {
    background: white;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Dark Mode */
.dark-mode {
    background: var(--dark-bg);
    color: var(--dark-text);
}

.dark-mode .main-content {
    background: var(--dark-bg);
}

.dark-mode .widget-card,
.dark-mode .chart-placeholder,
.dark-mode .user-list li {
    background: var(--dark-card);
    color: var(--dark-text);
}

.dark-mode .sidebar {
    background: #8b0000;
}
