/* Plus Jakarta Sans (SIL OFL), bundled locally. Shell spacing follows the JobSearch layout; the accent is Work Manager indigo. */
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/plus-jakarta-sans-latin-500-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
}

:root {
    color-scheme: light;
    --wm-ink: #171412;
    --wm-ink-soft: #3f3a36;
    --wm-muted: #6f675e;
    --wm-canvas: #f3efe8;
    --wm-surface: #fffcf8;
    --wm-surface-muted: #ece6dc;
    --wm-border: #e2dbd0;
    --wm-accent: #4338ca;
    --wm-accent-hover: #3730a3;
    --wm-accent-soft: #e0e7ff;
    --wm-sidebar: #141816;
    --wm-sidebar-text: #d9d4cc;
    --wm-sidebar-muted: #8d877e;
    --wm-danger: #c2413b;
    --wm-success: #2f7d57;
    --wm-radius-sm: 0.5rem;
    --wm-radius-md: 0.75rem;
    --wm-radius-lg: 1rem;
    --wm-shadow: 0 1px 2px rgba(23, 20, 18, 0.04), 0 12px 32px -18px rgba(23, 20, 18, 0.18);
    --wm-sidebar-width: 272px;
    --wm-font: "Plus Jakarta Sans", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    --wm-ease: 180ms ease;
}

html {
    font-size: 15px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    font-family: var(--wm-font);
    background: var(--wm-canvas);
    color: var(--wm-ink);
    line-height: 1.6;
    letter-spacing: -0.011em;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 2000;
    padding: 0.5rem 0.85rem;
    background: var(--wm-ink);
    color: var(--wm-surface);
    border-radius: var(--wm-radius-sm);
}

.skip-link:focus {
    top: 0.75rem;
    color: var(--wm-surface);
}

.app-shell {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

.app-sidebar {
    width: var(--wm-sidebar-width);
    min-width: var(--wm-sidebar-width);
    background: var(--wm-sidebar);
    color: var(--wm-sidebar-text);
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform var(--wm-ease);
}

.app-sidebar.active {
    transform: translateX(calc(-1 * var(--wm-sidebar-width)));
}

.sidebar-brand {
    padding: 1.35rem 1.25rem 1.1rem;
    border-bottom: 1px solid rgba(255, 252, 248, 0.08);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: inherit;
    text-decoration: none;
}

.brand-link:hover {
    color: #fff;
}

.brand-mark {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.85rem;
    display: block;
    box-shadow: 0 10px 24px -12px rgba(67, 56, 202, 0.9);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-name {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.03em;
    color: #fff;
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--wm-sidebar-muted);
}

.sidebar-nav {
    padding: 1rem 0.85rem 1.5rem;
}

.sidebar-label {
    margin: 1.15rem 0.75rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wm-sidebar-muted);
}

.sidebar-label:first-child {
    margin-top: 0.25rem;
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-list a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.75rem;
    margin: 0.15rem 0;
    border-radius: 0.7rem;
    color: var(--wm-sidebar-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.94rem;
    transition: background var(--wm-ease), color var(--wm-ease);
}

.nav-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    opacity: 0.85;
}

.sidebar-list a:hover {
    background: rgba(255, 252, 248, 0.06);
    color: #fff;
}

.sidebar-list a.active {
    background: rgba(67, 56, 202, 0.22);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(165, 180, 252, 0.45);
}

.sidebar-list a.active .nav-icon {
    color: #a5b4fc;
    opacity: 1;
}

.sidebar-backdrop {
    display: none;
}

.app-content {
    width: calc(100% - var(--wm-sidebar-width));
    margin-left: var(--wm-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 420px at 100% -10%, rgba(67, 56, 202, 0.08), transparent 55%),
        radial-gradient(900px 380px at -10% 0%, rgba(180, 83, 9, 0.06), transparent 50%),
        var(--wm-canvas);
    transition: margin-left var(--wm-ease), width var(--wm-ease);
}

.app-content.active {
    width: 100%;
    margin-left: 0;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    background: color-mix(in srgb, var(--wm-surface) 84%, transparent);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--wm-border);
}

.topbar-start,
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-toggle {
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid var(--wm-border);
    background: var(--wm-surface);
    color: var(--wm-ink);
    border-radius: 0.7rem;
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
}

.sidebar-toggle svg {
    width: 1.15rem;
    height: 1.15rem;
}

.sidebar-toggle:hover {
    background: var(--wm-surface-muted);
    border-color: #d4cdc2;
}

.topbar-title {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar-kicker {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wm-muted);
}

.topbar-page {
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--wm-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.2rem 0.7rem 0.2rem 0.2rem;
    background: var(--wm-surface);
    border: 1px solid var(--wm-border);
    border-radius: 999px;
}

.user-avatar {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--wm-accent-soft);
    color: var(--wm-accent);
    font-size: 0.7rem;
    font-weight: 700;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wm-ink-soft);
}

.logout-form {
    margin: 0;
}

.app-main {
    flex: 1 0 auto;
    padding: 1.75rem 1.75rem 3rem;
}

.app-footer {
    margin-top: auto;
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--wm-border);
    background: color-mix(in srgb, var(--wm-surface) 70%, transparent);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    color: var(--wm-muted);
    font-size: 0.875rem;
}

.footer-inner a {
    color: var(--wm-accent);
    font-weight: 600;
    text-decoration: none;
}

.footer-inner a:hover {
    text-decoration: underline;
}

.footer-dot {
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 999px;
    background: #c9c1b4;
}

h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2.1rem, 4vw, 3.1rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1.1;
}

a {
    color: var(--wm-accent);
}

.form-control {
    width: 100%;
    box-sizing: border-box;
    border-radius: var(--wm-radius-sm);
    border: 1px solid var(--wm-border);
    background: var(--wm-surface);
    color: var(--wm-ink);
    font: inherit;
    padding: 0.65rem 0.85rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--wm-accent);
    box-shadow: 0 0 0 4px rgba(67, 56, 202, 0.15);
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--wm-ink-soft);
    margin-bottom: 0.4rem;
}

.form-group {
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group-text {
    display: grid;
    place-items: center;
    padding: 0 0.85rem;
    background: var(--wm-surface-muted);
    border: 1px solid var(--wm-border);
    border-right: 0;
    border-radius: var(--wm-radius-sm) 0 0 var(--wm-radius-sm);
    color: var(--wm-muted);
}

.input-group-text svg {
    width: 1rem;
    height: 1rem;
}

.input-group .form-control {
    border-radius: 0 var(--wm-radius-sm) var(--wm-radius-sm) 0;
}

.input-group:focus-within .input-group-text {
    border-color: var(--wm-accent);
    color: var(--wm-accent);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.15rem;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--wm-accent);
}

.form-check-label {
    font-weight: 500;
}

.field-error {
    display: block;
    margin-top: 0.35rem;
    color: var(--wm-danger);
    font-size: 0.875rem;
}

.card {
    background: var(--wm-surface);
    border: 1px solid var(--wm-border);
    border-radius: var(--wm-radius-lg);
    box-shadow: var(--wm-shadow);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-header.bg-primary {
    background: var(--wm-ink);
    color: #f6f1ea;
}

.card-header h2 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
    font-weight: 600;
}

.card-header h2 svg {
    width: 1.15rem;
    height: 1.15rem;
}

.card-body {
    padding: 1.25rem 1.35rem 1.4rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 0.7rem;
    font: inherit;
    font-weight: 600;
    padding: 0.55rem 1.05rem;
    letter-spacing: -0.01em;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn svg {
    width: 1em;
    height: 1em;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 0.6rem;
}

.btn-lg {
    padding: 0.75rem 1.3rem;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--wm-accent);
    border-color: var(--wm-accent);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--wm-accent-hover);
    border-color: var(--wm-accent-hover);
    color: #fff;
}

.btn-outline-secondary {
    color: var(--wm-ink-soft);
    border-color: var(--wm-border);
    background: var(--wm-surface);
}

.btn-outline-secondary:hover {
    background: var(--wm-surface-muted);
    border-color: #d4cdc2;
    color: var(--wm-ink);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--wm-ink-soft);
}

.btn-ghost:hover {
    background: var(--wm-surface-muted);
    color: var(--wm-ink);
}

.alert {
    border: 1px solid transparent;
    border-radius: var(--wm-radius-md);
    padding: 0.75rem 1rem;
    margin: 0 0 1rem;
}

.alert ul {
    margin: 0;
    padding-left: 1.15rem;
}

.alert-success {
    background: #e7f4ec;
    color: #21563c;
    border-color: #c5e2d1;
}

.alert-danger {
    background: #fbeceb;
    color: #7a2a26;
    border-color: #f0c9c6;
}

.auth-panel {
    max-width: 28rem;
    margin: 1.5rem auto 0;
}

:focus-visible {
    outline: 2px solid var(--wm-accent);
    outline-offset: 2px;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
    width: 100%;
    padding: 0.6rem 1.25rem 0.7rem;
    background: lightyellow;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    padding: 1rem;
    background: #b32121;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(calc(-1 * var(--wm-sidebar-width)));
    }

    .app-sidebar.active {
        transform: translateX(0);
    }

    .app-content,
    .app-content.active {
        width: 100%;
        margin-left: 0;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(23, 20, 18, 0.45);
        z-index: 1030;
    }

    .sidebar-backdrop[hidden] {
        display: none;
    }

    .app-main,
    .app-topbar,
    .app-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .user-name {
        display: none;
    }

    .user-chip {
        padding-right: 0.45rem;
    }
}
