:root {
    --primary-blue: #0B4EA2;
    --secondary-blue: #163D8F;
    --primary-teal: #00A6A6;
    --secondary-teal: #008C8C;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
}

body {
    background-color: var(--light-gray);
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Brand ---------- */
.cemr-logo {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.cemr-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-blue));
    color: var(--white);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: .5px;
}

.cemr-logo-text {
    line-height: 1.1;
}

.cemr-logo-text small {
    display: block;
    font-size: .65rem;
    font-weight: 400;
    color: rgba(255,255,255,.75);
}

/* ---------- Auth / Guest layout ---------- */
.cemr-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-teal));
}

.cemr-auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
    overflow: hidden;
}

.cemr-auth-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    padding: 2rem 2rem 1.5rem;
    text-align: center;
}

.cemr-auth-header .cemr-logo-badge {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.cemr-auth-header h1 {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: .25rem;
}

.cemr-auth-header p {
    color: rgba(255,255,255,.8);
    font-size: .85rem;
    margin: 0;
}

.cemr-auth-body {
    padding: 2rem;
}

.btn-cemr-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-teal));
    border: none;
    color: var(--white);
    font-weight: 600;
}

.btn-cemr-primary:hover, .btn-cemr-primary:focus {
    background: linear-gradient(135deg, var(--secondary-blue), var(--secondary-teal));
    color: var(--white);
}

/* ---------- App shell ---------- */
.cemr-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: linear-gradient(180deg, var(--secondary-blue), #0a3d80);
    color: var(--white);
    z-index: 1030;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease;
}

.cemr-sidebar-brand {
    padding: 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.cemr-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: .75rem 0;
}

.cemr-sidebar-nav .nav-section {
    text-transform: uppercase;
    font-size: .68rem;
    letter-spacing: .08em;
    color: rgba(255,255,255,.5);
    padding: .75rem 1.25rem .25rem;
}

.cemr-sidebar-nav .nav-link {
    color: rgba(255,255,255,.85);
    padding: .6rem 1.25rem;
    font-size: .9rem;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.cemr-sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,.08);
    color: var(--white);
}

.cemr-sidebar-nav .nav-link.active {
    background: rgba(255,255,255,.12);
    border-left-color: var(--primary-teal);
    color: var(--white);
    font-weight: 600;
}

.cemr-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 260px;
    height: 64px;
    background: var(--white);
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1020;
    transition: left .25s ease;
}

.cemr-content {
    margin-left: 260px;
    padding-top: 64px;
    min-height: 100vh;
    transition: margin-left .25s ease;
}

@media (max-width: 991.98px) {
    .cemr-sidebar {
        transform: translateX(-100%);
    }
    .cemr-sidebar.show {
        transform: translateX(0);
    }
    .cemr-topbar, .cemr-content {
        left: 0;
        margin-left: 0;
    }
}

.cemr-page-body {
    padding: 1.5rem;
}

.cemr-stat-card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.cemr-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.4rem;
}
