:root {
    --app-ink: #172033;
    --app-muted: #667085;
    --app-line: #e3e8ef;
    --app-surface: #ffffff;
    --app-canvas: #f5f7fa;
    --app-primary: #2457d6;
    --app-primary-dark: #173f9f;
    --app-navy: #101828;
    --app-navy-soft: #1d2939;
}

html {
    min-height: 100%;
    font-size: 14px;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--app-canvas);
    color: var(--app-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus {
    border-color: #86a7f8;
    box-shadow: 0 0 0 0.22rem rgba(36, 87, 214, 0.14);
}

.app-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    z-index: 1020;
    top: 0;
    display: grid;
    min-height: 4.5rem;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 0.9rem;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(16, 24, 40, 0.08);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 0.2rem 1rem rgba(16, 24, 40, 0.04);
    backdrop-filter: blur(14px);
}

.app-menu-button {
    display: inline-grid;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    border: 1px solid var(--app-line);
    border-radius: 0.75rem;
    background: var(--app-surface);
    color: #344054;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.app-menu-button:hover {
    border-color: #b9c8ec;
    background: #f3f6ff;
    color: var(--app-primary);
}

.app-menu-button:focus-visible {
    outline: 3px solid rgba(36, 87, 214, 0.2);
    outline-offset: 2px;
}

.app-menu-button svg {
    width: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--app-ink);
    text-decoration: none;
}

.app-brand:hover {
    color: var(--app-ink);
}

.app-brand-mark {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border-radius: 0.7rem;
    background: linear-gradient(145deg, #356bea, #1a49ba);
    box-shadow: 0 0.4rem 1rem rgba(36, 87, 214, 0.24);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.app-brand-copy {
    display: grid;
    line-height: 1.05;
}

.app-brand-copy strong {
    font-size: 0.95rem;
    font-weight: 750;
}

.app-brand-copy small {
    margin-top: 0.2rem;
    color: var(--app-muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-current-page {
    color: #475467;
    font-size: 0.83rem;
    font-weight: 650;
}

.app-account {
    display: flex;
    justify-self: end;
    align-items: center;
    gap: 0.75rem;
}

.app-account form {
    margin: 0;
}

.app-user-name {
    color: var(--app-muted);
    font-size: 0.8rem;
}

.app-logout-button {
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--app-line);
    border-radius: 0.55rem;
    background: var(--app-surface);
    color: #344054;
    font-size: 0.78rem;
    font-weight: 650;
}

.app-logout-button:hover {
    border-color: #b9c8ec;
    background: #f3f6ff;
    color: var(--app-primary);
}

.app-main {
    width: 100%;
    max-width: 100rem;
    flex: 1;
    align-self: center;
    padding: 2rem 2rem 3rem;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2rem;
    border-top: 1px solid var(--app-line);
    background: #ffffff;
    color: #7b8496;
    font-size: 0.75rem;
}

.app-drawer {
    --bs-offcanvas-width: 19rem;
    border-right: 0;
    background: var(--app-navy);
    color: #ffffff;
}

.app-drawer-header {
    min-height: 7.25rem;
    align-items: flex-start;
    padding: 1.6rem 1.4rem 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-drawer-kicker {
    display: block;
    margin-bottom: 0.3rem;
    color: #91a7df;
    font-size: 0.67rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.app-drawer .offcanvas-title {
    font-size: 1.45rem;
    font-weight: 720;
    letter-spacing: -0.025em;
}

.app-drawer-body {
    display: flex;
    padding: 1.35rem 1rem;
    flex-direction: column;
}

.app-nav-label {
    margin: 0 0.75rem 0.65rem;
    color: #7e8ba4;
    font-size: 0.67rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.app-nav {
    display: grid;
    gap: 0.45rem;
}

.app-nav-link {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem;
    border: 1px solid transparent;
    border-radius: 0.85rem;
    color: #c7d0df;
    text-decoration: none;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.app-nav-link:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.app-nav-link.is-active {
    border-color: rgba(116, 150, 240, 0.25);
    background: linear-gradient(135deg, rgba(53, 107, 234, 0.3), rgba(53, 107, 234, 0.16));
    color: #ffffff;
}

.app-nav-link > svg {
    width: 2.4rem;
    height: 2.4rem;
    padding: 0.55rem;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.06);
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.45;
}

.app-nav-link.is-active > svg {
    background: #356bea;
    box-shadow: 0 0.35rem 0.8rem rgba(0, 0, 0, 0.2);
}

.app-nav-link > span {
    display: grid;
}

.app-nav-link strong {
    font-size: 0.87rem;
    font-weight: 680;
}

.app-nav-link small {
    margin-top: 0.15rem;
    color: #8491a8;
    font-size: 0.71rem;
}

.app-nav-link.is-active small {
    color: #b9c9f4;
}

.app-drawer-status {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: auto;
    padding: 1rem 0.75rem 0.15rem;
    color: #8491a8;
    font-size: 0.72rem;
}

.app-status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #32d583;
    box-shadow: 0 0 0 0.25rem rgba(50, 213, 131, 0.12);
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

@media (max-width: 767.98px) {
    .app-topbar {
        grid-template-columns: auto 1fr;
        min-height: 4.1rem;
        padding: 0 1rem;
    }

    .app-brand-copy small,
    .app-current-page,
    .app-user-name {
        display: none;
    }

    .app-main {
        padding: 1.25rem 1rem 2.25rem;
    }

    .app-footer {
        align-items: center;
        padding: 0.9rem 1rem;
        flex-direction: column;
    }
}
