﻿html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

/* ✅ ページ全体の横スクロールを防止 */
html, body {
    overflow-x: hidden;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #eaf2ff;
}

/* ✅ サイドバー（デスクトップ表示） */
.sidebar {
    width: 250px;
    height: 100vh;
    background: #343a40;
    color: white;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
    box-sizing: border-box;
}

    .sidebar h3 {
        text-align: center;
        font-weight: bold;
        margin-bottom: 20px;
        font-size: 22px;
    }

    .sidebar a {
        color: white;
        text-decoration: none;
        display: block;
        padding: 12px;
        margin: 8px 0;
        border-radius: 6px;
        transition: background 0.3s;
        font-size: 16px;
        font-weight: 500;
    }

        .sidebar a:hover {
            background: #495057;
        }

    .sidebar .logout-btn {
        background: #ff4d4d;
        color: white;
        border: none;
        padding: 12px;
        text-align: center;
        width: 100%;
        display: block;
        border-radius: 6px;
        margin-top: 20px;
        transition: background 0.3s;
        font-size: 16px;
        font-weight: 500;
    }

        .sidebar .logout-btn:hover {
            background: #e04444;
        }

/* ✅ メインコンテンツ（幅を正しく計算） */
.main-content {
    margin-left: 250px;
    padding: 20px;
    width: calc(100% - 250px);
    min-height: 100vh;
    overflow-x: hidden;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: margin-left 0.3s ease-in-out;
    box-sizing: border-box;
}

/* ✅ フッター */
.footer {
    margin-left: 250px;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    width: calc(100% - 250px);
    transition: margin-left 0.3s ease-in-out;
    box-sizing: border-box;
}

/* ✅ ハンバーガーメニュー */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    background: #343a40;
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 1001;
}

/* ✅ スマホ＆タブレット時のスタイル */
@media (max-width: 1024px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        width: 250px;
        height: 100vh;
        z-index: 1000;
        transition: transform 0.3s ease-in-out;
    }

        .sidebar.active {
            transform: translateX(0);
        }

    .main-content, .footer {
        margin-left: 0;
        width: 100%;
    }
}


/* 行の高さを狭める */
.custom-table th,
.custom-table td {
    padding: 4px 8px !important; /* 上下の余白を減らす */
    line-height: 1.2; /* 行間を狭くする */
    vertical-align: middle; /* コンテンツを中央寄せ */
}

/* ステータスバッジのサイズを小さく */
.badge {
    font-size: 0.85rem;
    padding: 3px 6px;
}

/*ログインボタン配色*/
/* Engage */
#loginEngage, .engage {
    background-color: rgb(77, 204, 213);
    border-color: rgb(77, 204, 213);
    color: white;
}

    #loginEngage:hover {
        background-color: rgb(57, 184, 193);
        border-color: rgb(57, 184, 193);
    }

    #loginEngage:disabled {
        background-color: rgba(77, 204, 213, 0.5);
        border-color: rgba(77, 204, 213, 0.5);
        color: white;
    }

/* Airwork */
#loginAirwork, .airwork {
    background-color: rgb(32, 174, 229);
    border-color: rgb(32, 174, 229);
    color: white;
}

    #loginAirwork:hover {
        background-color: rgb(22, 154, 209);
        border-color: rgb(22, 154, 209);
    }

    #loginAirwork:disabled {
        background-color: rgba(32, 174, 229, 0.5);
        border-color: rgba(32, 174, 229, 0.5);
        color: white;
    }

/* OwnedMaker */
#loginOwnedmaker, .ownedmaker {
    background-color: rgb(31, 115, 183);
    border-color: rgb(31, 115, 183);
    color: white;
}

    #loginOwnedmaker:hover {
        background-color: rgb(21, 95, 163);
        border-color: rgb(21, 95, 163);
    }

    #loginOwnedmaker:disabled {
        background-color: rgba(31, 115, 183, 0.5);
        border-color: rgba(31, 115, 183, 0.5);
        color: white;
    }

    /* Crs */
    #loginCrs , .crs {
         background-color: #3c8dbc;
        background-color: #3c8dbc;
        border-color: #3c8dbc;
        color: white;
    }

    #loginCrs:hover {
        background-color: #2c7ca0; /* 例: 元の色より少し暗め */
        border-color: #2c7ca0;
    }

    #loginCrs:disabled {
        background-color: rgba(60, 141, 188, 0.5);
        border-color: rgba(60, 141, 188, 0.5);
        color: white;
    }

/* Indeed */
/* Indeed */
#loginIndeed, .indeed {
    background-color: rgba(255, 255, 255, 0.5);
    border-color: #2557A7;
    color: #2557A7;
}

    /* ホバー時（濃い青背景＋白文字） */
    #loginIndeed:hover {
        background-color: #2557A7;
        border-color: #2557A7;
        color: white;
    }

    /* 無効状態（淡い青でグレー寄り） */
    #loginIndeed:disabled {
        background-color: rgba(37, 87, 167, 0.1);
        border-color: rgba(37, 87, 167, 0.3);
        color: rgba(37, 87, 167, 0.5);
    }


/*ラジオボタン*/
.company-radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border: 2px solid #ccc;
    border-radius: 40%;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: white;
}

    .company-radio-label:hover {
        border-color: #007bff;
    }

.company-radio:checked + .company-radio-label {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.company-radio {
    display: none; /* デフォルトのラジオボタンを非表示 */
}

/* 必須フィールドのデフォルト背景色（薄いピンク） */
.required-field {
    background-color: #ffe5e5 !important; /* 薄いピンク */
}

    /* エラー時（未入力時）の強調（濃いピンク） */
    .required-field.is-invalid {
        background-color: #ffcccc !important; /* さらに濃いピンク */
        border-color: #ff6666 !important;
    }

/* 大項目（メインカテゴリ） */
.occupation-category {
    font-weight: bold;
    font-size: 16px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

/* 中項目（大項目より右に寄せる） */
.level-sub .occupation-category {
    margin-left: 20px; /* 右にずらす */
    font-size: 14px;
    font-weight: normal;
    border-left: 3px solid #ccc; /* ツリーっぽく見せる */
    padding-left: 10px;
}

/* 開閉アイコン */
.toggle-icon {
    transition: transform 0.3s ease;
}

.expanded .toggle-icon {
    transform: rotate(90deg);
}

/* 小項目（選択肢） */
.occupation-item {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    background-color: #fff;
    border-bottom: 1px solid #ddd; /* 各行の境界線 */
    transition: background-color 0.2s ease;
    margin-left: 40px; /* 中項目よりさらに右へ */
}

    /* ホバー時に色を変更 */
    .occupation-item:hover {
        background-color: #f8f9fa;
    }

    /* チェック済みの行のデザイン */
    .occupation-item.checked {
        background-color: #d1ecf1;
        border-left: 4px solid #17a2b8;
    }

    /* チェックボックス */
    .occupation-item input {
        margin-right: 10px;
        cursor: pointer;
    }

/* 丸マーク（親項目の選択状態を示す） */
/* 丸マーク（親項目の選択状態を示す） */
.selected-indicator {
    display: none;
    width: 8px;
    height: 8px;
    background-color: #17a2b8;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
}

/* 親項目に選択された子項目がある場合、丸マークを表示 */
.has-selected .selected-indicator {
    display: inline-block;
}

/* ログインページのスタイル */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3983FD 0%, #5A9CFF 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .login-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(45deg, #3983FD, #5A9CFF);
    }

.login-header {
    margin-bottom: 30px;
}

.login-title {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    color: #555;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    box-sizing: border-box;
}

    .form-input:focus {
        outline: none;
        border-color: #3983FD;
        background-color: white;
        box-shadow: 0 0 0 3px rgba(57, 131, 253, 0.1);
    }

    .form-input::placeholder {
        color: #aaa;
    }

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #3983FD, #5A9CFF);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(57, 131, 253, 0.3);
}

    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(57, 131, 253, 0.4);
    }

    .login-btn:active {
        transform: translateY(0);
    }

.error-message {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

    .error-message::before {
        content: '⚠️';
        margin-right: 8px;
    }

.login-footer {
    margin-top: 30px;
    color: #888;
    font-size: 14px;
}

/* アニメーション効果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeInUp 0.6s ease-out;
}

/* レスポンシブデザイン */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
        margin: 10px;
    }

    .login-title {
        font-size: 24px;
    }

    .form-input {
        padding: 12px 15px;
    }

    .login-btn {
        padding: 12px;
    }
}

/* フォーカス時の追加効果 */
.form-group.focused .form-label {
    color: #3983FD;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* ローディング状態のボタン */
.login-btn:disabled {
    background: linear-gradient(45deg, #ccc, #999);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 日本語フォント対応 */
body {
    font-family: 'Noto Sans JP', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 追加のアニメーション効果 */
.form-group {
    transition: all 0.3s ease;
}

.form-input:valid {
    border-color: #28a745;
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

.media-cell[data-media="Airwork"] {
    background-color: rgb(32, 174, 229);
    border-color: rgb(32, 174, 229);
    color: white;
}

.media-cell[data-media="Indeed"] {
    background-color: white;
    border: 1px solid #2557A7;
    color: #2557A7;
}

.media-cell[data-media="Indeed(有料)"] {
    background-color: white;
    border: 1px solid #2557A7;
    color: #2557A7;
}

.media-cell[data-media="OwnedMaker"] {
    background-color: rgb(31, 115, 183);
    border-color: rgb(31, 115, 183);
    color: white;
}

.media-cell[data-media="Engage"] {
    background-color: rgb(77, 204, 213);
    border-color: rgb(77, 204, 213);
    color: white;
}

.media-cell[data-media="求人ボックス"] {
    background-color: rgb(11, 11, 11);
    border-color: rgb(11, 11, 11);
    color: white;
}

.media-cell[data-media="Crs"] {
    background-color: #3c8dbc;
    border-color: #3c8dbc;
    color: white;
}

/* 各列の幅を明示的に指定 */
.table tbody.text-center tr td:nth-child(1) { min-width: 40px; }    /* 番号 */
.table tbody.text-center tr td:nth-child(2) { min-width: 40px; }    /* チェックボックス */
.table tbody.text-center tr td:nth-child(3) { min-width: 160px; }   /* 企業名 */
.table tbody.text-center tr td:nth-child(4) { min-width: 70px; }    /* 契約 */
.table tbody.text-center tr td:nth-child(5) { min-width: 82px; }    /* サービス */
.table tbody.text-center tr td:nth-child(6) { min-width: 52px; }    /* Engage開設 */
.table tbody.text-center tr td:nth-child(7) { min-width: 52px; }    /* Engage更新 */
.table tbody.text-center tr td:nth-child(8) { min-width: 52px; }    /* Engage応募 */
.table tbody.text-center tr td:nth-child(9) { min-width: 52px; }    /* Airwork開設 */
.table tbody.text-center tr td:nth-child(10) { min-width: 52px; }  /* Airwork更新 */
.table tbody.text-center tr td:nth-child(11) { min-width: 52px; }  /* Airwork応募 */
.table tbody.text-center tr td:nth-child(12) { min-width: 52px; }  /* AirworkVer */
.table tbody.text-center tr td:nth-child(13) { min-width: 52px; }  /* Ownedaker開設 */
.table tbody.text-center tr td:nth-child(14) { min-width: 52px; }  /* Ownedaker更新 */
.table tbody.text-center tr td:nth-child(15) { min-width: 52px; }  /* Ownedaker応募 */
.table tbody.text-center tr td:nth-child(16) { min-width: 52px; }  /* Indeed開設 */
.table tbody.text-center tr td:nth-child(17) { min-width: 52px; }  /* CRS開設 */
.table tbody.text-center tr td:nth-child(18) { min-width: 52px; }  /* CRS更新 */
.table tbody.text-center tr td:nth-child(19) { min-width: 52px; }  /* CRS応募 */
.table tbody.text-center tr td:nth-child(20) { min-width: 250px; } /* 備考 */
.table tbody.text-center tr td:nth-child(21) { min-width: 65px; }  /* 編集 */

/* セル内コンテンツの省略表示 */
.custom-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 4px 8px !important;
}

/* 企業名と備考列は折り返し可能 */
.custom-table td:nth-child(3), 
.custom-table td:nth-child(20) {
    white-space: normal;
    word-wrap: break-word;
}

/* テーブルコンテナのスクロール設定 */
.table-responsive {
    overflow-x: auto;
    overflow-y: auto;
}

/* 応募者管理の失敗件数バッジ - 点滅アニメーション */
.failed-applicant-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: bold;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
    animation: urgent-pulse 2.5s ease-in-out infinite;
    border: 2px solid #ff0000;
    min-width: 28px;
}

.badge-count {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

/* 不快な点滅アニメーション（明滅を強調） */
@keyframes urgent-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
    }
    25% {
        opacity: 0.4;
        transform: scale(0.95);
        box-shadow: 0 2px 15px rgba(255, 68, 68, 0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
        box-shadow: 0 2px 20px rgba(255, 68, 68, 1);
        background: linear-gradient(135deg, #ff0000 0%, #990000 100%);
    }
    75% {
        opacity: 0.4;
        transform: scale(0.95);
        box-shadow: 0 2px 15px rgba(255, 68, 68, 0.8);
    }
}