/* ===========================
   Vella 社内ポータル CSS
   =========================== */

:root {
    /* Vella ロゴカラー */
    --blue:        #0078C8;
    --blue-bright: #0090E0;
    --blue-dark:   #0050A8;
    --blue-pale:   #E6F3FC;
    --gold:        #C8A828;
    --gold-bright: #ECC840;
    --gold-dark:   #A88800;
    --gold-pale:   #FBF5D8;
    --navy:        #0A1830;
    --logo-gray:   #505050;

    /* グラデーション */
    --grad-blue:   linear-gradient(135deg, #0090E0 0%, #0078C8 55%, #0050A8 100%);
    --grad-gold:   linear-gradient(135deg, #ECC840 0%, #C8A828 100%);
    --grad-header: linear-gradient(160deg, #0A1830 0%, #0E2448 100%);

    /* 後方互換エイリアス */
    --primary:      #0078C8;
    --primary-dark: #0A1830;
    --primary-mid:  #0090E0;
    --primary-light:#E6F3FC;
    --accent:       #ECC840;
    --accent-light: #FBF5D8;
    --text:         #1A2A40;
    --text-muted:   #607A96;
    --bg:           #F4F7FB;
    --white:        #ffffff;
    --border:       #CCDDEF;
    --shadow:       0 2px 12px rgba(10,24,48,0.10);
    --radius:       10px;
    --header-h:     108px;
    --header-row-top-h: 64px;
    --header-row-bottom-h: 44px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Yu Gothic', 'YuGothic', 'Hiragino Kaku Gothic ProN', sans-serif;
    font-weight: 500;
    color: var(--text);
    background: var(--bg);
    font-size: 15px;
    line-height: 1.7;
}

a { color: var(--primary-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--grad-header);
    z-index: 100;
    box-shadow: 0 2px 0 var(--blue), 0 4px 16px rgba(0,0,0,0.22);
    display: flex;
    flex-direction: column;
}
.header-row { flex-shrink: 0; }
.header-row-top { height: var(--header-row-top-h); }
.header-row-bottom {
    height: var(--header-row-bottom-h);
}
.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
}
.header-inner-bottom {
    gap: 6px;
    justify-content: center;
}
.header-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.header-logo-img {
    height: 32px;
    width: auto;
    display: block;
}
.login-logo-img {
    height: 48px;
    width: auto;
    display: block;
    margin: 0 auto;
}
.logo-text {
    font-size: 22px;
    font-weight: bold;
    color: var(--white);
    letter-spacing: 1px;
}
.logo-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.5px;
}
/* PC: 2-row nav (top=主要 / bottom=制度・素材・管理) */
.nav-row {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nav-row::-webkit-scrollbar { display: none; }
.nav-row-secondary {
    gap: 2px;
    justify-content: center;
}

/* Mobile drawer (hidden on PC) */
.header-nav { display: none; }
.nav-link {
    padding: 7px 10px;
    border-radius: 6px;
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}
.nav-link:hover {
    background: rgba(255,255,255,0.12);
    color: var(--white);
    text-decoration: none;
}
.nav-link.active {
    background: var(--blue);
    color: var(--white);
    text-decoration: none;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.btn-logout {
    padding: 6px 12px;
    border: 1px solid var(--gold);
    border-radius: 6px;
    color: var(--gold-bright);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-logout:hover {
    background: var(--gold);
    color: var(--navy);
    text-decoration: none;
}

/* ===== MAIN ===== */
.main-content {
    margin-top: var(--header-h);
    min-height: calc(100vh - var(--header-h) - 56px);
    padding: 36px 24px;
}
.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ===== PAGE HEADER ===== */
.page-header {
    margin-bottom: 32px;
}
.page-header h1 {
    font-size: 26px;
    font-weight: bold;
    color: var(--primary-dark);
    border-left: 4px solid var(--gold);
    padding-left: 16px;
}
.page-header p {
    margin-top: 8px;
    color: var(--text-muted);
    padding-left: 20px;
}

/* ===== CARDS ===== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 32px;
    margin-bottom: 24px;
}
.card h2 {
    font-size: 18px;
    color: var(--primary-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.dashboard-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s;
    text-decoration: none;
    display: block;
    border-top: 3px solid var(--gold);
}
.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,46,100,0.15);
    text-decoration: none;
}
.dashboard-card .dc-icon { font-size: 36px; margin-bottom: 12px; }
.dashboard-card .dc-title {
    font-size: 15px;
    font-weight: bold;
    color: var(--primary-dark);
}
.dashboard-card .dc-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ===== NOTICE BOARD ===== */
.notice-list { list-style: none; }
.notice-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.notice-list li:last-child { border-bottom: none; }
.notice-date { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.notice-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--gold-pale);
    color: var(--gold-dark);
    white-space: nowrap;
}

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
    background: var(--primary-dark);
    color: var(--white);
    padding: 10px 16px;
    text-align: left;
    font-weight: bold;
}
td { padding: 10px 16px; border-bottom: 1px solid var(--border); }
tr:hover td { background: var(--primary-light); }

/* ===== ORG CHART ===== */
.org-tree { text-align: center; padding: 20px 0; }
.org-node {
    display: inline-block;
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: bold;
    color: var(--primary-dark);
    font-size: 14px;
}
.org-node.root {
    background: var(--primary-dark);
    color: var(--white);
    border-color: var(--primary-dark);
    font-size: 16px;
    padding: 12px 32px;
}
.org-level {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.org-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.org-connector {
    width: 2px;
    height: 24px;
    background: var(--primary);
    margin: 0 auto;
}
.org-h-line {
    height: 2px;
    background: var(--border);
    flex: 1;
    margin-top: 20px;
}

.org-chart-lead {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 16px;
    line-height: 1.65;
}
.org-chart-embed {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    max-height: min(800px, 85vh);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
}
.org-chart-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===== MEMBER CARDS ===== */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.member-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 16px;
    text-align: center;
}
.member-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--grad-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 26px;
    color: var(--white);
    font-weight: bold;
}
.member-name { font-weight: bold; font-size: 15px; color: var(--primary-dark); }
.member-role { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.member-dept {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    padding: 3px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
}

/* ===== MEMBER PROFILE（紹介フォーマット） ===== */
.member-profile-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.member-profile {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 32px;
    border-top: 4px solid var(--gold);
}
.member-profile-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.member-profile-header .member-avatar {
    margin: 0;
    flex-shrink: 0;
}
.member-profile-name {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-dark);
    margin-bottom: 6px;
}
.member-profile-furigana {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.member-profile-role-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.member-profile-role-line .member-role {
    font-size: 14px;
    color: var(--text);
    font-weight: bold;
}
.member-profile-section {
    margin-bottom: 22px;
    scroll-margin-top: calc(var(--header-h) + 12px);
}
.member-profile-section:last-child {
    margin-bottom: 0;
}
.member-profile-section-title {
    font-size: 15px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 6px;
    padding-left: 12px;
    border-left: 3px solid var(--primary-mid);
}
.member-profile-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.5;
}
.member-profile-section-body {
    font-size: 14px;
    color: var(--text);
    line-height: 1.85;
    padding-left: 4px;
}
.page-header code,
.card code {
    font-size: 12px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, monospace;
}

.member-intro-card-title {
    font-size: 16px;
    color: var(--primary-dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.member-intro-list {
    margin: 0;
    padding-left: 22px;
    font-size: 14px;
    color: var(--text);
    line-height: 1.85;
}
.member-intro-list li { margin-bottom: 6px; }

.member-page-tools {
    display: grid;
    gap: 20px;
    margin-bottom: 28px;
}
@media (min-width: 720px) {
    .member-page-tools {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}
.member-search-label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.member-search-input {
    width: 100%;
    max-width: 420px;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.member-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(17, 118, 212, 0.15);
}
.member-nav-heading {
    font-size: 13px;
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.member-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}
.member-nav-list a {
    font-size: 14px;
    font-weight: bold;
    color: var(--primary-mid);
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
}
.member-nav-list a:hover {
    border-bottom-color: var(--primary-mid);
}
.member-nav-meta {
    font-weight: normal;
    color: var(--text-muted);
    font-size: 13px;
}

.member-profile-toc {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 24px;
}
.member-profile-toc-title {
    font-size: 12px;
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.member-profile-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.member-profile-toc-list a {
    font-size: 13px;
    color: var(--primary-mid);
    text-decoration: none;
    display: inline-block;
    padding: 2px 0;
}
.member-profile-toc-list a:hover {
    text-decoration: underline;
}

.member-profile-back {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
    font-size: 14px;
}
.member-profile-back a {
    color: var(--primary-mid);
    font-weight: bold;
}

@media (max-width: 600px) {
    .member-profile {
        padding: 20px 18px;
    }
    .member-profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .member-profile-header .member-avatar {
        margin: 0 auto;
    }
    .member-profile-role-line {
        justify-content: center;
    }
    .member-profile-toc-list {
        grid-template-columns: 1fr;
    }
}

/* ===== CAREER PATH ===== */
.career-steps {
    display: flex;
    gap: 0;
    align-items: stretch;
    overflow-x: auto;
    padding-bottom: 8px;
}
.career-step {
    flex: 1;
    min-width: 140px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 16px 14px;
    text-align: center;
    position: relative;
}
.career-step + .career-step { margin-left: 28px; }
.career-step + .career-step::before {
    content: '→';
    position: absolute;
    left: -22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--primary);
}
.career-step .step-level {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.career-step .step-title {
    font-weight: bold;
    font-size: 14px;
    color: var(--primary-dark);
}
.career-step .step-years {
    font-size: 12px;
    color: var(--primary);
    margin-top: 6px;
}
.career-step.highlight {
    border-color: var(--primary);
    background: var(--primary-light);
}

/* ===== ACCORDION（社内規程） ===== */
.accordion-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}
.accordion-header {
    width: 100%;
    background: var(--white);
    border: none;
    padding: 16px 20px;
    text-align: left;
    font-size: 15px;
    font-weight: bold;
    color: var(--primary-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s;
}
.accordion-header:hover { background: var(--primary-light); }
.accordion-header .arrow { transition: transform 0.2s; font-size: 12px; color: var(--primary); }
.accordion-header.open .arrow { transform: rotate(180deg); }
.accordion-body {
    display: none;
    padding: 16px 20px;
    background: var(--bg);
    font-size: 14px;
    line-height: 1.8;
    border-top: 1px solid var(--border);
}
.accordion-body.open { display: block; }

/* ===== KNOWLEDGE（ノウハウ） ===== */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.knowledge-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    border-left: 4px solid var(--gold);
}
.knowledge-card .kc-tag {
    font-size: 11px;
    color: var(--gold-dark);
    background: var(--gold-pale);
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 10px;
}
.knowledge-card .kc-title {
    font-weight: bold;
    font-size: 15px;
    color: var(--primary-dark);
    margin-bottom: 8px;
}
.knowledge-card .kc-body { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,0.5);
    text-align: center;
    padding: 16px;
    font-size: 13px;
    border-top: 2px solid var(--blue-dark);
}

/* ===== LOGIN ===== */
.login-body {
    background: linear-gradient(160deg, #0A1830 0%, #0E2448 50%, #0050A8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-wrapper { width: 100%; max-width: 420px; padding: 24px; }
.login-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
    padding: 44px 40px;
}
.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 28px;
    text-align: center;
    justify-content: center;
}
.login-logo .logo-text { font-size: 28px; font-weight: bold; color: var(--primary-dark); }
.login-logo .logo-sub { font-size: 14px; color: var(--text-muted); }
.login-title {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 24px;
    text-align: center;
}
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.15s;
    outline: none;
}
.form-group input:focus { border-color: var(--primary); }
.btn-primary {
    background: var(--grad-blue);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.15s, box-shadow 0.15s;
}
.btn-primary:hover {
    opacity: 0.88;
    box-shadow: 0 4px 14px rgba(0,120,200,0.35);
}
.btn-full { width: 100%; }
.alert {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-error { background: #fff0f0; color: #c0392b; border: 1px solid #f5c6cb; }

/* ===== 写真 ===== */
.member-avatar { overflow: hidden; }
.member-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.photo-placeholder-large {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 36px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 編集ボタン（メンバー一覧） ===== */
.btn-edit-profile {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.btn-edit-profile:hover {
    background: var(--primary);
    color: var(--white);
}

/* ===== プロフィール編集ページ ===== */
.edit-section { margin-bottom: 28px; }
.edit-section-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.edit-note { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }

.photo-edit-wrap { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.photo-preview { flex-shrink: 0; }
.photo-preview-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
}
.photo-form-area { flex: 1; min-width: 220px; }

.badge-required {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 6px;
}

.edit-form .form-group { margin-bottom: 18px; }
.edit-form label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 4px;
    color: var(--text);
}
.field-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.edit-form input[type="text"],
.edit-form input[type="password"],
.edit-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: var(--white);
    color: var(--text);
    transition: border-color 0.15s;
}
.edit-form input[type="text"]:focus,
.edit-form input[type="password"]:focus,
.edit-form textarea:focus {
    outline: none;
    border-color: var(--primary-mid);
    box-shadow: 0 0 0 3px rgba(17,118,212,0.15);
}
.edit-form textarea { resize: vertical; line-height: 1.6; }
.form-actions { margin-top: 24px; }

.profile-static-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 14px;
}
.profile-static-label {
    font-weight: bold;
    color: var(--text-muted);
    min-width: 120px;
}

.alert-success { background: #eafaf1; color: #1e8449; border: 1px solid #a9dfbf; }

/* ===== HAMBURGER TOGGLE (mobile only) ===== */
.nav-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.08);
    color: var(--white);
    cursor: pointer;
    padding: 6px 12px 6px 10px;
    margin-left: auto;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 120;
    transition: background 0.15s, border-color 0.15s;
}
.nav-toggle:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.5);
}
.nav-toggle-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    width: 20px;
    height: 20px;
}
.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--white);
    margin: 2.5px 0;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.2s;
}
.nav-toggle-text {
    line-height: 1;
    color: var(--white);
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(4.5px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-4.5px) rotate(-45deg);
}
.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10,24,48,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 90;
}
.nav-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}
.nav-link-logout { display: none; }
body.nav-locked { overflow: hidden; }

/* ===== RESPONSIVE ===== */
/* Medium PC (769-1180px): さらに詰める */
@media (min-width: 769px) and (max-width: 1180px) {
    .header-inner { gap: 12px; padding: 0 14px; }
    .logo-sub { display: none; }
    .nav-link { padding: 6px 8px; font-size: 12.5px; }
    .nav-lv-label { display: none; }
    .btn-logout { padding: 5px 10px; font-size: 11.5px; }
}

@media (max-width: 768px) {
    :root { --header-h: 64px; }
    .header-inner { padding: 0 12px; gap: 8px; }
    .header-logo-img { height: 26px; }
    .logo-sub { font-size: 10px; letter-spacing: 0; }
    .nav-toggle { display: inline-flex; }

    /* PCの2段ナビは非表示 */
    .nav-row { display: none; }
    .header-row-bottom { display: none; }

    .header-nav {
        display: flex;
        position: fixed;
        top: var(--header-h);
        right: 0;
        width: min(82vw, 320px);
        max-height: calc(100vh - var(--header-h));
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--grad-header);
        padding: 12px 0;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        box-shadow: -4px 0 20px rgba(0,0,0,0.3);
        z-index: 110;
    }
    .header-nav.is-open { transform: translateX(0); }
    .header-nav .nav-link {
        padding: 14px 22px;
        border-radius: 0;
        font-size: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .header-nav .nav-link.active {
        background: var(--blue);
        border-left: 4px solid var(--gold);
        padding-left: 18px;
    }
    .nav-link-logout {
        display: block;
        margin-top: 8px;
        color: var(--gold-bright) !important;
        border-top: 1px solid rgba(255,255,255,0.12) !important;
        border-bottom: 0 !important;
    }
    .header-actions { display: none; }

    .main-content { padding: 24px 14px; }
    .container { padding: 0; }
    .card { padding: 18px 16px; }
    .page-header h1 { font-size: 22px; padding-left: 12px; }
    .page-header p { font-size: 13px; padding-left: 16px; }

    .dashboard-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .dashboard-card { padding: 20px 12px; }
    .dashboard-card .dc-icon { font-size: 30px; margin-bottom: 8px; }
    .dashboard-card .dc-title { font-size: 13px; }
    .dashboard-card .dc-desc { font-size: 11px; }

    .career-steps { flex-direction: column; }
    .career-step + .career-step { margin-left: 0; margin-top: 28px; }
    .career-step + .career-step::before { content: '↓'; left: 50%; top: -22px; transform: translateX(-50%); }

    table { font-size: 13px; }
    th, td { padding: 8px 10px; }
    .table-wrap { margin: 0 -4px; -webkit-overflow-scrolling: touch; }

    .notice-list li { flex-wrap: wrap; gap: 6px 10px; padding: 10px 0; }

    .member-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .member-card { padding: 18px 10px; }

    .accordion-header { padding: 12px 14px; font-size: 14px; }
    .accordion-body { padding: 14px; font-size: 13px; }

    .knowledge-grid { gap: 12px; }
    .knowledge-card { padding: 16px; }
}

@media (max-width: 480px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .member-grid { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 20px; }
    .notice-list li { font-size: 13px; }
    .notice-date, .notice-tag { font-size: 11px; }
}

/* Any .table-wrap: ensure horizontal scroll at all sizes */
.table-wrap { overflow-x: auto; }

/* ===== NAV LEVEL BADGE ===== */
.nav-level-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid var(--lv-color, #6b7280);
    border-radius: 20px;
    padding: 3px 10px 3px 6px;
    line-height: 1;
}
.nav-lv-num {
    background: var(--lv-color, #6b7280);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 12px;
    letter-spacing: 0.04em;
}
.nav-lv-label {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .nav-level-badge { display: none; }
}
