html, body {
    height: 100%;
    margin: 0;
    font-size: 15px;
}

#wrapper {
    min-height: 100vh;
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 230px;
    min-height: 100vh;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background-color: #1a1d21;
}

.sidebar-brand {
    padding: 1.25rem 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: block;
    letter-spacing: 0.02em;
}

.sidebar-brand:hover { color: #adb5bd; }

.sidebar .nav-link {
    color: #adb5bd;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
}

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

.sidebar .nav-link.active {
    background-color: rgba(255,255,255,0.12);
    color: #fff;
    font-weight: 600;
}

.sidebar-section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6c757d;
    padding: 0.75rem 0.9rem 0.2rem;
}

.sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.83rem;
    color: #6c757d;
}

/* Main content */
#page-content {
    flex: 1;
    background-color: #f4f6f9;
    overflow-y: auto;
}

.page-inner {
    padding: 1.75rem 2rem;
    max-width: 1100px;
}

/* Cards */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e9ecef;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
}

/* Session content (markdown rendered) */
.session-content {
    line-height: 1.75;
    color: #212529;
}

.session-content h1, .session-content h2 {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.3em;
    margin-top: 1.5em;
}

.session-content h3, .session-content h4 { margin-top: 1.25em; }

.session-content code {
    background-color: #f0f2f4;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.88em;
}

.session-content pre {
    background-color: #f0f2f4;
    padding: 1em 1.25em;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.88em;
}

.session-content pre code { background: none; padding: 0; }

.session-content blockquote {
    border-left: 4px solid #dee2e6;
    margin-left: 0;
    padding-left: 1em;
    color: #6c757d;
}

.session-content ul, .session-content ol { padding-left: 1.5em; }

.session-content input[type=checkbox] { margin-right: 0.35em; }

/* Search results */
.search-result-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.15s;
}

.search-result-card:hover { border-color: #adb5bd; }

/* Table tweaks */
.table th { font-weight: 600; font-size: 0.83rem; text-transform: uppercase; letter-spacing: 0.05em; color: #6c757d; }

/* Alerts / badges */
.badge-admin { background-color: #6610f2; }
.badge-user { background-color: #0d6efd; }

/* Login page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f4f6f9;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 12px;
    padding: 2rem 2.25rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.login-card .brand {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1a1d21;
}
