/* ==========================================================================
   style_staff.css - 統合されたスタッフ用スタイルシート（CSS変数なし版）
   ========================================================================== */

@charset "utf-8";

/* ==========================================================================
   基本リセット・ベーススタイル
   ========================================================================== */
* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   レイアウト構造
   ========================================================================== */
header {
    background-color: #333;
    color: #fff;
    text-align: center;
    flex-shrink: 0;
}

.content-wrapper {
    display: flex;
    flex-grow: 1;
    width: 100%;
    overflow: hidden;
}

nav {
    background-color: #f4f4f4;
    padding: 1em;
    width: 200px;
    flex-shrink: 0;
}

nav ul {
    list-style: none;
    padding-left: 40px;
    margin: 0;
}

nav li {
    margin: 0.5em 0;
}

main {
    padding: 1em;
    padding-right: 200px;
    flex-grow: 1;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    text-align: center;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    flex-shrink: 0;
}

/* ==========================================================================
   共通コンポーネント
   ========================================================================== */

/* フォーム要素 */
input[type="text"],
input[type="password"],
input[type="email"] {
    padding: 4px 8px;
    border: 1px solid #000;
    border-radius: 4px;
    font-size: 0.9em;
}

input[type="radio"],
input[type="checkbox"] {
    margin: 0 4px;
}

label {
    margin: 0 8px;
    cursor: pointer;
}

/* エラーメッセージ */
.error-message {
    color: red;
    font-weight: bold;
    margin: 8px 0;
}

.error-list {
    color: red;
    text-align: left;
    margin: 16px 0;
}

/* ==========================================================================
   テーブル基本スタイル
   ========================================================================== */
table {
    border-collapse: separate;
    border-spacing: 0;
}

th,
td {
    border: 1px solid #000;
    padding: 5px;
    text-align: center;
    font-size: 0.9em;
}

thead {
    background-color: lightgray;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

/* ==========================================================================
   一覧系テーブル（list_table）
   ========================================================================== */
.table_box {
    height: 700px;
    flex-grow: 1;
    overflow-y: auto;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.list_table {
    padding: 5px;
    min-width: max-content;
}

.list_table thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: lightgray;
}

.thead {
    border: 1px solid #000;
}

/* セル共通スタイル */
.record {
    padding: 5px;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
}

/* カラム幅設定 */
#date_col {
    width: 80px;
}

#id_col {
    width: 50px;
}

#notify_col {
    width: 100px;
}

#insdatetime_col {
    width: 120px;
}

/* セルスタイル */
#date,
#id,
#notify,
#insdatetime {
    text-align: center;
}

#date {
    border-left: 1px solid #000;
}

#notNotify {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    border-left: 1px solid #000;
}

/* ==========================================================================
   登録フォーム系テーブル（table-wrapper）
   ========================================================================== */
.table-wrapper {
    margin: 0 auto;
    width: 100%;
    max-width: 500px;
}

.table-wrapper table {
    border-collapse: collapse;
    width: 100%;
}

.scroll-body {
    max-height: 50vh;
    overflow-y: scroll;
    border-bottom: 1px solid #ccc;
}

.scroll-body table {
    table-layout: fixed;
    border-collapse: collapse;
}

/* フォーム行のスタイル */
.form-row td {
    padding: 5px;
    border: 1px solid #000;
}

/* ==========================================================================
   ヘッダー・タイトル
   ========================================================================== */
.header_1,
.header_column {
    font-size: 20px;
    text-align: center;
}

/* ==========================================================================
   特殊効果・アニメーション
   ========================================================================== */
.highlight-row {
    background: linear-gradient(45deg,
            lightpink,
            peachpuff,
            lemonchiffon,
            honeydew,
            aliceblue,
            lavender,
            thistle);
    background-size: 200% 100%;
    animation: flowBackground 6s infinite alternate;
    font-weight: bold;
    color: #000;
}

@keyframes flowBackground {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 0%;
    }
}

/* ==========================================
   スクロール可能テーブル統一スタイル
   ========================================== */

/* 基本的なテーブル wrapper */
.scroll-table-wrapper {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background-color: #fff;
}

/* position: sticky を使用したスクロールテーブル（推奨） */
.scroll-table-sticky {
    width: fit-content;
    height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.scroll-table-sticky table {
    border-collapse: collapse;
}

.scroll-table-sticky th {
    position: sticky;
    top: 0;
    background-color: #f5f5f5;
    z-index: 1;
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    white-space: nowrap;
}

.scroll-table-sticky td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

/* 分割テーブル（ヘッダーとボディが別々） */
.scroll-table-split {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background-color: #fff;
}

.scroll-table-split table {
    width: 100%;
    border-collapse: collapse;
}

.scroll-table-split th {
    background-color: #f5f5f5;
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    white-space: nowrap;
}

.scroll-table-split td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

.scroll-table-split .scroll-body {
    height: 400px;
    overflow-y: auto;
    border-top: 1px solid #ddd;
}

/* 標準的な列幅クラス */
.col-xs {
    width: 40px;
}

.col-sm {
    width: 80px;
}

.col-md {
    width: 120px;
}

.col-lg {
    width: 200px;
}

.col-xl {
    width: 300px;
}

.col-checkbox {
    width: 40px;
    text-align: center;
}

.col-id {
    width: 60px;
    text-align: center;
}

.col-name {
    width: 150px;
}

.col-password {
    width: 200px;
}

.col-email {
    width: 250px;
}

.col-date {
    width: 60px;
}

.col-regist {
    width: 100px;
}

.col-status {
    width: 100px;
    text-align: center;
}

/* フォーム要素用スタイル */
.scroll-table-sticky input[type="text"],
.scroll-table-sticky input[type="password"],
.scroll-table-sticky input[type="email"],
.scroll-table-sticky select,
.scroll-table-split input[type="text"],
.scroll-table-split input[type="password"],
.scroll-table-split input[type="email"],
.scroll-table-split select {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}

.scroll-table-sticky input[type="checkbox"],
.scroll-table-split input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* ホバー効果 */
.scroll-table-sticky tbody tr:hover,
.scroll-table-split .scroll-body tbody tr:hover {
    background-color: #f9f9f9;
}

/* 選択された行のスタイル */
.scroll-table-sticky tbody tr.selected,
.scroll-table-split .scroll-body tbody tr.selected {
    background-color: #e3f2fd;
}

/* 高さのバリエーション */
.scroll-table-height-sm {
    width: 500px;
    margin: 0 auto;
    height: 200px;
}

.scroll-table-height-md {
    width: 500px;
    margin: 0 auto;
    height: 300px;
}

.scroll-table-height-lg {
    width: 500px;
    margin: 0 auto;
    height: 400px;
}

.scroll-table-height-xl {
    width: 500px;
    margin: 0 auto;
    height: 600px;
}

/* スクロールバーのスタイル（Webkit系ブラウザ） */
.scroll-table-sticky::-webkit-scrollbar,
.scroll-table-split .scroll-body::-webkit-scrollbar {
    width: 12px;
}

.scroll-table-sticky::-webkit-scrollbar-track,
.scroll-table-split .scroll-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.scroll-table-sticky::-webkit-scrollbar-thumb,
.scroll-table-split .scroll-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.scroll-table-sticky::-webkit-scrollbar-thumb:hover,
.scroll-table-split .scroll-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 読み込み中のスタイル */
.scroll-table-loading {
    position: relative;
    opacity: 0.6;
}

.scroll-table-loading::after {
    content: '読み込み中...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* エラー状態のスタイル */
.scroll-table-error {
    border-color: #f44336;
}

.scroll-table-error th {
    background-color: #ffebee;
}

/* 空のテーブル用スタイル */
.scroll-table-empty {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* trainee_notify_list 専用幅（横スクロールしない） */
.scroll-table-wide {
    width: fit-content;
    max-width: 1200px;
    margin: 0 auto;
}

#chart {
    width: 90%;
    max-width: 100%;
    padding: 0 50px;
}

/* 学科名とラジオボタン群を横並びにする */
.department-and-selector {
    display: flex;
    justify-content: center;
}

.department-name {
    font-size: 16px;
    font-weight: bold;
}


.period-selector form {
    display: flex;
    margin: 0;
}

.period-selector label {
    display: flex;
    cursor: pointer;
    font-size: 14px;
}

.period-selector label:hover {
    background-color: #e9ecef;
}

.period-selector input[type="radio"] {
    margin: 0;
}

