@font-face {
    font-family: "Noto Sans JP";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/noto-sans-jp/noto-sans-jp-400.woff2") format("woff2");
}

@font-face {
    font-family: "Noto Sans JP";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/noto-sans-jp/noto-sans-jp-500.woff2") format("woff2");
}

@font-face {
    font-family: "Noto Sans JP";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/noto-sans-jp/noto-sans-jp-700.woff2") format("woff2");
}

:root {
    --navy: #071f4e;
    --navy-2: #0d2d68;
    --orange: #e97831;
    --orange-soft: #fff1e7;
    --ink: #202838;
    --muted: #6f798b;
    --line: #e4e8ef;
    --background: #f4f6f9;
    --green: #168565;
    --green-soft: #e9f7f1;
    --red: #bd4932;
    --red-soft: #fceeea;
    --yellow-soft: #fff7df;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    color: var(--ink);
    background: var(--background);
    font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.account-menu {
    position: relative;
    min-width: 0;
}

.account-menu-trigger {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border: 0;
    border-radius: 9px;
    color: #dce4f2;
    background: transparent;
    font-size: 12.5px;
    font-weight: 500;
    text-align: left;
}

.account-menu-trigger:hover,
.account-menu-trigger:focus-visible,
.account-menu-trigger[aria-expanded="true"] {
    color: #fff;
    background: rgb(255 255 255 / 8%);
}

.account-menu-trigger:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 1px;
}

.account-menu-avatar {
    width: 26px;
    height: 26px;
    display: inline-flex;
    flex: 0 0 26px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: #1c3a70;
    font-size: 12px;
    font-weight: 500;
}

.account-menu-name,
.account-menu-heading {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu-name {
    max-width: 180px;
}

.account-menu-caret {
    flex: 0 0 auto;
    margin-left: auto;
    color: #8fa3c8;
    font-size: 11px;
    transition: transform .15s ease;
}

.account-menu-trigger[aria-expanded="true"] .account-menu-caret {
    transform: rotate(180deg);
}

.account-menu-panel {
    position: absolute;
    z-index: 60;
    min-width: 210px;
    padding: 6px;
    border: 1px solid #35578f;
    border-radius: 12px;
    background: #1b3a74;
    box-shadow: 0 12px 32px rgb(2 10 32 / 60%);
}

.account-menu-panel[hidden] {
    display: none;
}

.account-menu-heading {
    padding: 8px 10px 7px;
    border-bottom: 1px solid #2c4d87;
    margin-bottom: 4px;
    color: #93a5c8;
    font-size: 11px;
}

.account-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    color: #dde6f5;
    background: transparent;
    font-size: 12.5px;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
    color: #fff;
    background: rgb(255 255 255 / 12%);
    outline: 0;
}

.account-menu-item--logout {
    color: #e8a9a0;
}

.account-menu-item--logout:hover,
.account-menu-item--logout:focus-visible {
    color: #ffc7bf;
    background: rgb(210 90 70 / 14%);
}

.account-menu-logout-form {
    margin: 0;
}

.account-menu--admin {
    margin: 12px 16px 14px;
    padding-top: 12px;
    border-top: 1px solid rgb(255 255 255 / 9%);
}

.account-menu--admin .account-menu-trigger {
    width: 100%;
}

.account-menu--admin .account-menu-name {
    max-width: 126px;
}

.account-menu--admin .account-menu-panel {
    right: 0;
    bottom: calc(100% + 6px);
    left: 0;
    min-width: 0;
}

.front-topbar {
    position: relative;
    z-index: 20;
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 26px;
    border-bottom: 1px solid #11305f;
    color: #dce4f2;
    background: var(--navy);
}

.front-topbar-brand {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1.15;
}

.front-topbar-brand small {
    display: block;
    margin-top: 2px;
    color: #7d8db0;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .2em;
}

.front-topbar-spacer {
    flex: 1;
}

.account-menu--front .account-menu-trigger {
    max-width: min(300px, 42vw);
}

.account-menu--front .account-menu-panel {
    top: calc(100% + 8px);
    right: 0;
}

.front-page-body .simple-page-shell {
    min-height: calc(100vh - 62px);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 560px) minmax(420px, 1fr);
    background: #fff;
}

.login-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 70px 64px;
    color: #fff;
    background: radial-gradient(circle at 20% 15%, #194383 0, #0a2a64 36%, #051b47 100%);
}

.login-brand::after {
    position: absolute;
    right: -170px;
    bottom: -130px;
    width: 420px;
    height: 420px;
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 50%;
    box-shadow: 0 0 0 70px rgb(255 255 255 / 3%), 0 0 0 140px rgb(255 255 255 / 2.5%);
    content: "";
}

.logo {
    position: relative;
    z-index: 1;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .16em;
}

.logo small,
.side-brand small {
    display: block;
    margin-top: 4px;
    color: #8fa7d1;
    font-size: 10px;
    letter-spacing: .3em;
}

.brand-copy,
.brand-foot {
    position: relative;
    z-index: 1;
}

.brand-copy h1 {
    margin: 0 0 16px;
    font-size: 34px;
    line-height: 1.35;
    letter-spacing: .02em;
}

.brand-copy p {
    max-width: 420px;
    margin: 0;
    color: #b8c7e0;
}

.brand-foot {
    color: #8198bd;
    font-size: 11px;
}

.login-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.login-card {
    width: min(430px, 100%);
}

.login-card h2 {
    margin: 0 0 6px;
    color: var(--navy);
    font-size: 27px;
}

.lead {
    margin: 0 0 28px;
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--orange);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 500;
}

.required {
    margin-left: 3px;
    color: var(--orange);
}

.input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: #fff;
}

.input:focus {
    border-color: var(--orange);
    outline: none;
    box-shadow: 0 0 0 3px var(--orange-soft);
}

.password-field {
    position: relative;
}

.password-field .input {
    padding-right: 68px;
}

.password-toggle {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 5px 10px;
    border: 0;
    border-radius: 7px;
    color: var(--navy);
    background: #f2f4f8;
    font-size: 11px;
    font-weight: 500;
}

.primary-button {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 12px 16px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--orange);
    font-weight: 500;
    text-align: center;
}

.primary-button:hover {
    filter: brightness(.96);
}

.button-link {
    text-decoration: none;
}

.auth-secondary-link {
    margin: 18px 0 0;
    text-align: center;
}

.auth-secondary-link a {
    color: var(--navy-2);
    font-size: 12px;
    font-weight: 500;
}

.auth-secondary-link a:focus-visible {
    border-radius: 4px;
    outline: 3px solid var(--orange-soft);
    outline-offset: 3px;
}

.notice {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 12.5px;
}

.notice.info {
    border: 1px solid #d7e4fb;
    color: #315b99;
    background: #eef4ff;
}

.notice.warn {
    border: 1px solid #f0dfae;
    color: #795711;
    background: var(--yellow-soft);
}

.notice.error {
    border: 1px solid #f1cfc7;
    color: #8d3422;
    background: var(--red-soft);
}

.app-body {
    min-height: 100vh;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 238px;
    flex: 0 0 auto;
    color: #bdc9de;
    background: var(--navy);
}

.side-brand {
    padding: 22px;
    border-bottom: 1px solid #173463;
    color: #fff;
    font-weight: 800;
    letter-spacing: .12em;
}

.side-nav p {
    margin: 0;
    padding: 20px 22px 7px;
    color: #7084a7;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
}

.side-nav a {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 11px 20px;
    border-left: 3px solid transparent;
    color: #b3c0d5;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.side-nav a.active {
    border-left-color: var(--orange);
    color: #fff;
    background: var(--navy-2);
}

.main-column {
    min-width: 0;
    flex: 1;
}

.topbar {
    height: 64px;
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.topbar strong {
    color: var(--navy);
}

.topbar-spacer {
    flex: 1;
}

.userbox {
    line-height: 1.35;
    text-align: right;
}

.userbox b {
    font-size: 12px;
}

.userbox small {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.logout-button {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--navy);
    background: #fff;
    font-size: 11px;
    font-weight: 500;
}

.content {
    padding: 28px 34px 64px;
}

.page {
    max-width: 1180px;
    margin: 0 auto;
}

.breadcrumb {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 11px;
}

.page-title {
    margin-bottom: 21px;
}

.page-title h1 {
    margin: 0 0 3px;
    color: var(--navy);
    font-size: 23px;
}

.page-title p {
    margin: 0;
    color: var(--muted);
    font-size: 12.5px;
}

.welcome-panel {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.welcome-icon {
    width: 48px;
    height: 48px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 14px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 22px;
    font-weight: 800;
}

.welcome-panel h2 {
    margin: 0 0 3px;
    color: var(--navy);
    font-size: 18px;
}

.welcome-panel p {
    margin: 0;
    color: var(--muted);
}

.simple-page-body {
    min-height: 100vh;
    background: radial-gradient(circle at 15% 10%, #173f7d 0, var(--navy) 42%, #041536 100%);
}

.simple-page-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.simple-page-card {
    width: min(560px, 100%);
    padding: 52px 48px;
    border: 1px solid rgb(255 255 255 / 42%);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgb(0 0 0 / 24%);
    text-align: center;
}

.simple-page-card h1 {
    margin: 14px 0 8px;
    color: var(--navy);
    font-size: 28px;
}

.forbidden-card {
    width: min(640px, 100%);
}

.forbidden-card h1 {
    overflow-wrap: anywhere;
    font-size: clamp(24px, 2.2vw, 28px);
}

.simple-page-card > p:not(.eyebrow, .error-code) {
    margin: 0 0 28px;
    color: var(--muted);
}

.simple-page-icon {
    width: 64px;
    height: 64px;
    display: grid;
    margin: 0 auto;
    place-items: center;
    border-radius: 18px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 30px;
    font-weight: 800;
}

.forbidden-icon {
    color: var(--red);
    background: var(--red-soft);
}

.error-code {
    margin: 0 0 18px;
    color: var(--orange);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .24em;
}

.inline-button {
    width: auto;
    min-width: 220px;
    display: inline-block;
    padding-inline: 28px;
}

.secondary-button {
    padding: 10px 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--navy);
    background: #fff;
    font-weight: 500;
}

.front-site-card {
    width: min(720px, 100%);
    padding: 42px 44px;
}

.front-intro {
    margin-bottom: 24px !important;
}

.site-selection-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f9fafc;
    text-align: left;
}

.site-selection-heading {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

.site-selection-heading h2 {
    margin: 0;
    color: var(--navy);
    font-size: 18px;
}

.selection-status {
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--navy);
    background: #e7edf7;
    font-size: 11px;
    font-weight: 800;
}

.selection-status[data-state="selected"] {
    color: var(--green);
    background: var(--green-soft);
}

.selection-status[data-state="no_candidates"] {
    color: var(--red);
    background: var(--red-soft);
}

.current-site {
    display: grid;
    gap: 2px;
    margin: 0 0 16px;
}

.current-site span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.current-site strong {
    color: var(--navy);
    overflow-wrap: anywhere;
}

.site-selection-form {
    margin-bottom: 14px;
}

.site-selection-form label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 500;
}

.site-selection-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.site-selection-controls select {
    min-width: 0;
}

.site-selection-submit {
    width: auto;
    min-width: 104px;
    margin: 0;
}

.site-selection-help,
.field-error,
.site-dependent-state {
    margin: 7px 0 0;
    font-size: 12px;
}

.site-selection-help {
    color: var(--muted);
}

.field-error {
    color: var(--red);
    font-weight: 700;
}

.site-selection-empty {
    margin-bottom: 0;
}

.site-dependent-state {
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.site-dependent-state strong {
    color: var(--navy);
}

@media (max-width: 940px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }
}

@media (max-width: 700px) {
    .login-side {
        padding: 34px 22px;
    }

    .sidebar {
        display: none;
    }

    .topbar {
        padding: 0 14px;
    }

    .content {
        padding: 22px 14px 50px;
    }

    .simple-page-shell {
        padding: 18px 14px;
    }

    .front-site-card {
        padding: 30px 18px;
    }

    .site-selection-panel {
        padding: 18px 16px;
    }

    .site-selection-heading {
        align-items: center;
    }

    .site-selection-controls {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-selection-submit {
        width: 100%;
    }

    .front-topbar {
        gap: 8px;
        padding: 8px 12px;
    }

    .front-topbar-brand {
        font-size: 12px;
    }

    .account-menu--front .account-menu-trigger {
        max-width: 48vw;
        padding-inline: 7px;
    }

    .account-menu--front .account-menu-name {
        max-width: 24vw;
    }

    .account-menu--front .account-menu-panel {
        min-width: min(210px, calc(100vw - 24px));
    }
}
