/* ========================================
   style.css
   ページ固有のスタイル
   ======================================== */


/* ========================================
   ログインページ
   ======================================== */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
}

.login-box__title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333333;
}

.login-box__subtitle {
    text-align: center;
    font-size: 0.8125rem;
    color: #666666;
    margin-bottom: 32px;
}

.login-box label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 6px;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}

.login-box__password-wrap {
    position: relative;
}

.login-box__password-wrap input {
    padding-right: 44px;
}

.login-box__password-toggle {
    position: absolute;
    right: 10px;
    top: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999999;
    padding: 0;
    line-height: 1;
}

.login-box__password-toggle:hover {
    color: #5A9AC7;
}

.login-box input:focus {
    outline: none;
    border-color: #83B8DD;
}

.login-box__hint {
    font-size: 0.75rem;
    color: #999999;
    margin-top: 8px;
    text-align: center;
}

.login-box__submit {
    width: 100%;
    padding: 12px;
    background: #83B8DD;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.login-box__submit:hover {
    background: #5A9AC7;
}

.login-box__error {
    background: #FFF0F0;
    color: #D32F2F;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.8125rem;
    margin-bottom: 20px;
    text-align: center;
}


/* ========================================
   トップページ（カリキュラムマップ）
   ======================================== */

.curriculum-section {
    margin: 48px 0;
}

.curriculum-section__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333333;
    padding-bottom: 12px;
    border-bottom: 2px solid #83B8DD;
    margin-bottom: 24px;
}

.curriculum-section__desc {
    font-size: 0.875rem;
    color: #666666;
    margin-bottom: 24px;
    line-height: 1.8;
}


/* --- 全体の進捗バー --- */

.overall-progress {
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.overall-progress__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.overall-progress__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333333;
}

.overall-progress__count {
    font-size: 0.8125rem;
    color: #5A9AC7;
    font-weight: 600;
}

.overall-progress__bar {
    height: 8px;
    background: #E8F2FA;
    border-radius: 4px;
    overflow: hidden;
}

.overall-progress__fill {
    height: 100%;
    background: #5A9AC7;
    border-radius: 4px;
    transition: width 0.4s ease;
}


/* --- ステップカード --- */

.step-card {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s;
    color: inherit;
}

.step-card:hover {
    border-color: #83B8DD;
    box-shadow: 0 2px 8px rgba(131, 184, 221, 0.15);
    color: inherit;
}

.step-card__number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #E8F2FA;
    color: #83B8DD;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    margin-right: 16px;
}

.step-card__number--completed {
    background: #5A9AC7;
    color: #FFFFFF;
}

.step-card__content {
    flex: 1;
}

.step-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.step-card__meta {
    font-size: 0.75rem;
    color: #999999;
}

.step-card__meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
}

.step-card__video-count {
    font-size: 0.6875rem;
    color: #5A9AC7;
    font-weight: 600;
}

.step-card__progress {
    height: 4px;
    background: #E8F2FA;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.step-card__progress-fill {
    height: 100%;
    background: #83B8DD;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.step-card__progress-fill--completed {
    background: #5A9AC7;
}

.step-card__status {
    flex-shrink: 0;
    font-size: 0.75rem;
    margin-left: 12px;
}

.step-card__status--completed {
    color: #5A9AC7;
    font-weight: 600;
}

.step-card__status--incomplete {
    color: #CCCCCC;
}



/* ========================================
   個別STEPページ
   ======================================== */

.step-page {
    margin: 40px 0;
}

.step-page__header {
    margin-bottom: 32px;
}

.step-page__label {
    display: inline-block;
    background: #E8F2FA;
    color: #5A9AC7;
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 3px;
    margin-bottom: 1rem;
}

.step-page__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    border-bottom: 2px solid #83B8DD;
    padding-bottom: .5rem;
}


/* --- カテゴリ全体の説明文 --- */

.step-overview {
    margin-bottom: 1rem;
    padding: 0;
    background: none;
    border-radius: 0;
    font-size: 1rem;
    line-height: 1.9;
    color: #444;
}

.step-overview p {
    margin-bottom: 8px;
}

.step-overview p:last-child {
    margin-bottom: 0;
}


/* --- 動画一覧（複数動画対応） --- */

.step-videos {
    margin: 3rem 0;
}

.step-videos__item {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e8e8e8;
}

.step-videos__item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-videos__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222;
    margin-bottom: .8rem;
    padding-left: .8rem;
    border-left: 3px solid #83B8DD;
    line-height: 1.4;
}

.step-videos__duration {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #5A9AC7;
    background: #E8F2FA;
    padding: 2px 10px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.step-videos__duration::before {
    content: "⏱ ";
}


/* --- 動画埋め込み --- */

.step-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-bottom: 20px;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.step-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* --- 動画の説明文 --- */

.video-description {
    font-size: 1rem;
    line-height: 1.9;
    color: #444;
    margin-bottom: 16px;
}

.video-description p {
    margin-bottom: 12px;
}

.video-description p:last-child {
    margin-bottom: 0;
}


/* --- 注意ボックス --- */
.notice-box {
    background: #fafafa;
    border: 1px dashed #ccc;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: .875rem;
    line-height: 1.8;
    color: #666;
}

.notice-box__title {
    font-size: .875rem;
    font-weight: 700;
    color: #666;
    margin-bottom: .3rem;
}


/* --- 資料リンク --- */

.step-materials {
    background: #FFFDF5;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 16px;
    border: 1px solid #F0E6C0;
}

.step-materials__title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 8px;
}

.step-materials__item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 0.875rem;
    color: #333333;
    border-bottom: 1px solid #F0E6C0;
    font-weight: 500;
}

.step-materials__item:last-child {
    border-bottom: none;
}

.step-materials__icon {
    color: #5A9AC7;
    margin-right: 8px;
    flex-shrink: 0;
}


/* --- 動画ごとの完了ボタン --- */

.video-complete {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
}

.video-complete__btn {
    display: inline-block;
    background: #E87097;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.video-complete__btn:hover {
    background: #D45C83;
}

.video-complete__btn--completed {
    background: #5A9AC7;
    cursor: pointer;
}

.video-complete__btn--completed:hover {
    background: #CC6666;
}

.video-complete__btn--error {
    background: #E87097;
    cursor: pointer;
}


/* --- STEP全体の進捗バー --- */

.step-complete {
    margin-top: 40px;
    padding: 24px;
    background: #F8FAFB;
    border-radius: 12px;
    border: 1px solid #E0E0E0;
    text-align: center;
}

.step-complete--single {
    border: none;
    background: none;
    padding: 32px 0;
    border-top: 1px solid #e0e0e0;
    border-radius: 0;
}

.step-complete__progress {
    margin-bottom: 12px;
}

.step-complete__progress-text {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 8px;
}

.step-complete__progress-bar {
    width: 100%;
    height: 8px;
    background: #E0E0E0;
    border-radius: 4px;
    overflow: hidden;
}

.step-complete__progress-fill {
    height: 100%;
    background: #E87097;
    border-radius: 4px;
    transition: width 0.3s;
}

.step-complete__message {
    font-size: 0.8125rem;
    color: #999999;
    margin: 0;
}

.step-complete__done {
    font-size: 1rem;
    font-weight: 700;
    color: #5A9AC7;
}


/* --- 本文エリア --- */

.step-content {
    margin-bottom: 32px;
}

.step-content h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #333333;
    margin: 32px 0 12px;
    padding-left: 12px;
    border-left: 3px solid #83B8DD;
}

.step-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333333;
    margin: 24px 0 8px;
}

.step-content p {
    margin-bottom: 16px;
    line-height: 1.8;
}

.step-content ul,
.step-content ol {
    margin: 0 0 16px 24px;
    list-style: revert;
}

.step-content li {
    margin-bottom: 8px;
}


/* --- 前後ナビゲーション --- */

.step-nav {
    display: flex;
    justify-content: space-between;
    padding: 24px 0;
    margin-top: 16px;
}

.step-nav__link {
    font-size: 0.875rem;
    color: #83B8DD;
    font-weight: 600;
}

.step-nav__link:hover {
    color: #5A9AC7;
}


/* ========================================
   進捗ダッシュボード（管理者用）
   ======================================== */

.dashboard {
    margin: 40px 0;
}

.dashboard__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #83B8DD;
}

.dashboard__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.dashboard__table th {
    background: #F8F9FA;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #333333;
    border-bottom: 2px solid #E0E0E0;
    white-space: nowrap;
}

.dashboard__table td {
    padding: 10px 12px;
    border-bottom: 1px solid #E0E0E0;
    vertical-align: middle;
}

.dashboard__table tr:hover td {
    background: #FAFAFA;
}


/* --- 進捗バー --- */

.progress-bar {
    width: 100%;
    height: 8px;
    background: #E0E0E0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    background: #83B8DD;
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-bar__fill--complete {
    background: #5A9AC7;
}

.progress-text {
    font-size: 0.75rem;
    color: #666666;
    margin-top: 4px;
}


/* --- ステータスアイコン --- */

.status-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 0.625rem;
    color: #FFFFFF;
}

.status-icon--done {
    background: #5A9AC7;
}

.status-icon--not {
    background: #E0E0E0;
}


/* ========================================
   スタッフ管理
   ======================================== */

.staff-msg {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.staff-msg--success {
    background: #E8F2FA;
    color: #5A9AC7;
}

.staff-msg--error {
    background: #FFF0F0;
    color: #D32F2F;
}


/* --- スタッフ追加フォーム --- */

.staff-add {
    background: #F8F9FA;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.staff-add__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 16px;
}

.staff-add__form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.staff-add__field {
    flex: 1;
    min-width: 140px;
}

.staff-add__field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #666666;
    margin-bottom: 4px;
}

.staff-add__field input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 0.875rem;
}

.staff-add__field input:focus {
    outline: none;
    border-color: #83B8DD;
}

.staff-add__hint {
    font-size: 0.6875rem;
    color: #999;
    margin-top: 2px;
}

.staff-add__btn {
    padding: 8px 20px;
    background: #83B8DD;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.staff-add__btn:hover {
    background: #5A9AC7;
}


/* --- スタッフ一覧 --- */

.staff-list__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 12px;
}

.staff-list__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.staff-list__info {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.staff-list__name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #333333;
}

.staff-list__username {
    font-size: 0.75rem;
    color: #999999;
}

.staff-list__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.staff-list__pw-form {
    display: flex;
    align-items: center;
    gap: 4px;
}

.staff-list__pw-input {
    width: 140px;
    padding: 6px 8px;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    font-size: 0.8125rem;
}

.staff-list__pw-input:focus {
    outline: none;
    border-color: #83B8DD;
}

.staff-list__btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.staff-list__btn--pw {
    background: #E0E0E0;
    color: #333333;
}

.staff-list__btn--pw:hover {
    background: #ccc;
}

.staff-list__btn--del {
    background: none;
    color: #D32F2F;
    border: 1px solid #D32F2F;
}

.staff-list__btn--del:hover {
    background: #D32F2F;
    color: #FFFFFF;
}


/* ========================================
   レスポンシブ
   ======================================== */

@media (max-width: 600px) {

    /* ダッシュボードテーブル → カード表示 */
    .dashboard__table--responsive thead {
        display: none;
    }

    .dashboard__table--responsive tbody,
    .dashboard__table--responsive tr,
    .dashboard__table--responsive td {
        display: block;
        width: 100%;
    }

    .dashboard__table--responsive tr {
        background: #FFFFFF;
        border: 1px solid #E0E0E0;
        border-radius: 8px;
        padding: 16px;
        margin-bottom: 12px;
    }

    .dashboard__table--responsive td {
        border: none;
        padding: 4px 0;
    }

    .dashboard__table--responsive td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        color: #999999;
        display: block;
        margin-bottom: 2px;
    }

    /* STEPページ */
    .step-page__title {
        font-size: 1.25rem;
    }
    
    .step-videos__title {
        font-size: 1rem;
    }
    
    .step-overview,
    .video-description {
        font-size: .875rem;
    }
    

    /* ステップナビゲーション */
    .step-nav {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    /* スタッフ管理 */
    .staff-add__form {
        flex-direction: column;
    }

    .staff-add__field {
        width: 100%;
    }

    .staff-list__item {
        flex-direction: column;
        align-items: flex-start;
    }

    .staff-list__actions {
        width: 100%;
    }

    .staff-list__pw-form {
        flex: 1;
    }

    .staff-list__pw-input {
        flex: 1;
        width: auto;
    }

    /* ログインボックス */
    .login-box {
        padding: 24px;
        margin: 0 16px;
    }
}
