:root {
    --primary-color: #1a73e8;
    /* Google Blue */
    --secondary-color: #5f6368;
    /* Google Gray */
    --background-color: #f8f9fa;
    /* Very light gray background */
    --sidebar-width: 250px;
    --header-height: 64px;
    --card-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --border-radius: 8px;
    --font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background-color);
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    color: #202124;
}

/* Layout Structure */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: #fff;
    color: var(--secondary-color);
    transition: all 0.3s;
    height: 100vh;
    position: fixed;
    z-index: 999;
    border-right: 1px solid #dadce0;
}

#sidebar .sidebar-header {
    padding: 20px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f3f4;
}

#sidebar .sidebar-header img {
    max-height: 40px;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul p {
    color: #fff;
    padding: 10px;
}

#sidebar ul li a {
    padding: 10px 24px;
    font-size: 0.95rem;
    display: block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    border-radius: 0 24px 24px 0;
    margin-right: 16px;
}

#sidebar ul li a:hover {
    background-color: #f1f3f4;
    color: #202124;
}

#sidebar ul li.active>a,
a[aria-expanded="true"] {
    color: var(--primary-color);
    background: #e8f0fe;
}

#sidebar ul li a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

/* Content */
#content {
    width: 100%;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.top-navbar {
    background: #fff;
    height: var(--header-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #dadce0;
    position: sticky;
    top: 0;
    z-index: 99;
}

.top-navbar .page-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #202124;
}

.top-navbar .user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.top-navbar .user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.top-navbar .user-profile span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Cards */
.modern-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
    padding: 24px;
    margin-bottom: 24px;
    border: none;
    transition: box-shadow 0.2s;
}

.modern-card:hover {
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

.modern-card .card-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #202124;
    margin-bottom: 16px;
}

.modern-card .card-value {
    font-size: 2rem;
    font-weight: 400;
    color: var(--primary-color);
}

.modern-card .card-icon {
    float: right;
    font-size: 2rem;
    color: #dadce0;
}

.main-content {
    padding: 32px;
    flex: 1;
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-white {
    background-color: #fff !important;
}

.rounded-lg {
    border-radius: 8px !important;
}

.btn-google {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    padding: 8px 24px;
    border-radius: 4px;
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
}

.btn-google:hover {
    background-color: #1558b0;
    color: white;
    text-decoration: none;
}

/* Dropdown Menu Customization */
.dropdown-menu {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 8px 0;
    margin-top: 10px;
    /* Spacing from toggle */
}

.dropdown-item {
    padding: 10px 24px;
    color: #5f6368;
    /* secondary color */
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #e8f0fe;
    /* Light primary color */
    color: #1a73e8 !important;
    /* Primary color */
    text-decoration: none;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: #1a73e8;
    color: #fff;
}

/* Ensure logout text keeps its danger color unless active */
.dropdown-item.text-danger:hover {
    background-color: #fce8e6;
    /* Light red */
    color: #d93025;
    /* Google Red */
}

/* Discord badge overlay on user avatar */
.discord-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #5865F2;
    /* Discord Blurple */
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 11px;
    width: 20px;
    height: 20px;
    cursor: default;
}