/* Material Design 3 - Variables and Reset */
:root {
    --md-sys-color-primary: #4f46e5; /* Indigo */
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #e0e7ff;
    --md-sys-color-on-primary-container: #3730a3;
    
    --md-sys-color-secondary: #ec4899;
    --md-sys-color-surface: #ffffff;
    --md-sys-color-surface-dim: #f3f4f6;
    --md-sys-color-on-surface: #111827;
    --md-sys-color-on-surface-variant: #4b5563;
    --md-sys-color-outline: #cbd5e1;
    
    --md-sys-elevation-1: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --md-sys-elevation-2: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-full: 9999px;

    --sidebar-width: 260px;
    --topbar-height: 72px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--md-sys-color-surface-dim);
    color: var(--md-sys-color-on-surface);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.md3-sidebar {
    width: var(--sidebar-width);
    background-color: var(--md-sys-color-surface);
    border-right: 1px solid var(--md-sys-color-outline);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
    color: var(--md-sys-color-primary);
}

.logo-icon {
    font-size: 32px;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: var(--md-sys-shape-corner-full);
    color: var(--md-sys-color-on-surface-variant);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.sidebar-link:hover {
    background-color: var(--md-sys-color-surface-dim);
    color: var(--md-sys-color-on-surface);
}

.sidebar-link.active {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.nav-divider {
    height: 1px;
    background-color: var(--md-sys-color-outline);
    margin: 16px 8px;
    opacity: 0.5;
}

.sidebar-footer {
    padding: 16px;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border-radius: var(--md-sys-shape-corner-medium);
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 500;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: #fee2e2;
    color: #ef4444;
}

/* Main Content */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

/* Topbar */
.md3-topbar {
    height: var(--topbar-height);
    background-color: var(--md-sys-color-surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--md-sys-color-surface-dim);
    border-radius: var(--md-sys-shape-corner-full);
    padding: 8px 16px;
    gap: 8px;
    width: 400px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 15px;
    color: var(--md-sys-color-on-surface);
}

.search-bar .material-icons-outlined {
    color: var(--md-sys-color-on-surface-variant);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--md-sys-color-on-surface-variant);
    position: relative;
    transition: background-color 0.2s;
}

.icon-btn:hover {
    background-color: var(--md-sys-color-surface-dim);
}

.badge {
    position: absolute;
    top: 6px;
    right: 4px;
    background-color: var(--md-sys-color-secondary);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--md-sys-shape-corner-full);
    transition: background-color 0.2s;
}

.user-profile-menu:hover {
    background-color: var(--md-sys-color-surface-dim);
}

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

/* Page Content Formatting */
.page-content {
    padding: 32px;
}

.page-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 24px;
}

/* Dashboard Specifc Cards */
.md3-card {
    background-color: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    padding: 24px;
    box-shadow: var(--md-sys-elevation-1);
    transition: box-shadow 0.3s ease;
}

.md3-card:hover {
    box-shadow: var(--md-sys-elevation-2);
}
