.atsys-mov-wrap {
    max-width: 960px;
    margin: 0 auto;
    font-family: sans-serif;
}

.atsys-mov-login-notice {
    padding: 12px;
    background: #fff3cd;
    border-left: 4px solid #f0ad4e;
    margin: 16px 0;
}

/* ===== カテゴリ絞り込みボタン ===== */
.atsys-mov-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.atsys-mov-filter-btn {
    padding: 6px 18px;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: #fff;
    color: #555;
    cursor: pointer;
    font-size: 0.88em;
    line-height: 1.4;
    transition: background .15s, border-color .15s, color .15s;
}

.atsys-mov-filter-btn:hover {
    border-color: #0073aa;
    color: #0073aa;
}

.atsys-mov-filter-btn.is-active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
    font-weight: 600;
}

/* ===== 動画一覧テーブル ===== */
.atsys-mov-list-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.95em;
}

.atsys-mov-list-table thead tr {
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
}

.atsys-mov-list-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.atsys-mov-list-table td {
    padding: 14px 14px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.atsys-mov-list-table tbody tr:last-child td {
    border-bottom: none;
}

.atsys-mov-list-table tbody tr:hover {
    background: #fafafa;
}

.atsys-mov-row-expired {
    background: #fdf5f5 !important;
    color: #999;
}

/* 並び替えボタン */
.atsys-mov-sortable {
    white-space: nowrap;
    cursor: default;
}

.atsys-mov-sort-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 1px 5px;
    margin-left: 4px;
    font-size: 0.78em;
    color: #888;
    cursor: pointer;
    vertical-align: middle;
    line-height: 1;
    transition: background .15s, color .15s, border-color .15s;
}

.atsys-mov-sort-btn:hover {
    background: #e8f4fd;
    border-color: #0073aa;
    color: #0073aa;
}

.atsys-mov-sort-btn.is-active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.atsys-mov-sort-icon {
    font-style: normal;
}

/* 列幅 */
.atsys-mov-col-title   { width: 28%; }
.atsys-mov-col-desc    { width: 32%; color: #555; font-size: 0.9em; }
.atsys-mov-col-expires { width: 16%; white-space: nowrap; }
.atsys-mov-col-status  { width: 14%; white-space: nowrap; }
.atsys-mov-col-action  { width: 10%; text-align: center; white-space: nowrap; }

.atsys-mov-empty {
    color: #bbb;
}

.atsys-mov-expires-active {
    color: #0073aa;
    font-size: 0.88em;
}

.atsys-mov-expires-over {
    color: #b32d2e;
    font-size: 0.88em;
}

/* バッジ共通 */
.atsys-mov-badge-viewed,
.atsys-mov-badge-new,
.atsys-mov-badge-completed,
.atsys-mov-badge-expired {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.82em;
    font-weight: bold;
    white-space: nowrap;
}

.atsys-mov-badge-viewed {
    background: #e8f5e9;
    color: #2e7d32;
}

.atsys-mov-badge-new {
    background: #e3f2fd;
    color: #1565c0;
    font-weight: normal;
}

.atsys-mov-badge-completed {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}

.atsys-mov-badge-expired {
    background: #fce4e4;
    color: #b32d2e;
}

/* 再生ボタン */
.atsys-mov-btn-play {
    display: inline-block;
    padding: 6px 14px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.88em;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}

.atsys-mov-btn-play:hover {
    background: #005a87;
}

.atsys-mov-btn-cert {
    display: inline-block;
    margin-top: 6px;
    padding: 5px 12px;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    border-radius: 4px;
    font-size: 0.84em;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s;
}

.atsys-mov-btn-cert:hover {
    background: #c8e6c9;
    color: #1b5e20;
}

/* 期限切れ通知（単体プレイヤー） */
.atsys-mov-expired-notice {
    padding: 14px 18px;
    background: #fce4e4;
    border-left: 4px solid #b32d2e;
    border-radius: 4px;
    margin-bottom: 16px;
    color: #b32d2e;
}

/* レスポンシブ（768px以下） */
@media (max-width: 768px) {
    .atsys-mov-list-table,
    .atsys-mov-list-table thead,
    .atsys-mov-list-table tbody,
    .atsys-mov-list-table th,
    .atsys-mov-list-table td,
    .atsys-mov-list-table tr {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .atsys-mov-list-table {
        border: none;
        background: transparent;
    }

    .atsys-mov-list-table thead {
        display: none;
    }

    .atsys-mov-list-table tbody tr {
        border: 1px solid #ddd;
        border-radius: 8px;
        margin-bottom: 12px;
        background: #fff;
        padding: 4px 0;
        box-shadow: 0 1px 4px rgba(0,0,0,.06);
    }

    .atsys-mov-row-expired {
        background: #fdf5f5 !important;
    }

    .atsys-mov-list-table td {
        padding: 8px 14px;
        border-bottom: 1px solid #f0f0f0;
        display: flex;
        align-items: baseline;
        gap: 8px;
        white-space: normal;
    }

    .atsys-mov-list-table tbody tr td:last-child {
        border-bottom: none;
    }

    .atsys-mov-list-table td::before {
        content: attr(data-label);
        flex-shrink: 0;
        font-weight: 600;
        font-size: 0.80em;
        color: #888;
        min-width: 5em;
    }

    /* タイトル列は太字を維持 */
    .atsys-mov-col-title {
        width: 100%;
    }

    /* 備考列は折り返し許可 */
    .atsys-mov-col-desc {
        width: 100%;
        word-break: break-all;
    }

    /* 再生ボタンは全幅 */
    .atsys-mov-col-action {
        justify-content: flex-start;
    }

    .atsys-mov-btn-play {
        width: 100%;
        padding: 10px;
        font-size: 1em;
        text-align: center;
    }

    .atsys-mov-btn-cert {
        width: 100%;
        text-align: center;
        padding: 8px 12px;
    }
}

/* ===== 単体プレイヤー ===== */
.atsys-mov-single .atsys-mov-title {
    font-size: 1.3em;
    margin-bottom: 12px;
}

.atsys-mov-desc {
    color: #555;
    font-size: 0.9em;
    margin-bottom: 10px;
}

/* YouTube / Vimeo 埋め込み */
.atsys-mov-yt-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 12px;
}

.atsys-mov-yt-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* アップロード動画 */
.atsys-mov-video-el {
    display: block;
    margin-bottom: 12px;
}

/* ===== ログインフォーム ===== */
.atsys-mov-login-box {
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 36px 40px;
}
.atsys-mov-login-title {
    margin: 0 0 24px;
    font-size: 1.4em;
    text-align: center;
}
.atsys-mov-login-error {
    background: #fde8e8;
    color: #c0392b;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: 0.9em;
}
.atsys-mov-login-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: 0.9em;
}
.atsys-mov-link-back {
    color: #0073aa;
    font-size: 0.9em;
}
.atsys-mov-login-group {
    margin-bottom: 18px;
}
.atsys-mov-login-group label {
    display: block;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}
.atsys-mov-login-group input[type="text"],
.atsys-mov-login-group input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color .2s;
}
.atsys-mov-login-group input[type="text"]:focus,
.atsys-mov-login-group input[type="password"]:focus {
    border-color: #0073aa;
    outline: none;
}
.atsys-mov-login-remember {
    margin-bottom: 22px;
}
.atsys-mov-login-remember label {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.atsys-mov-login-btn {
    width: 100%;
    padding: 12px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.atsys-mov-login-btn:hover {
    background: #005a87;
}
.atsys-mov-login-reset {
    text-align: center;
    margin: 16px 0 0;
    font-size: 0.85em;
    color: #666;
}
.atsys-mov-login-reset a {
    color: #0073aa;
}

/* ===== 動画モーダル ===== */
/* position:fixed が親要素の transform 等に依存しないよう body 直下に移動（JS側で処理） */
.atsys-mov-modal { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 99999; align-items: center; justify-content: center; padding: 12px; box-sizing: border-box; }
.atsys-mov-modal.is-open { display: flex; }
.atsys-mov-modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,.8); }
.atsys-mov-modal-dialog { position: relative; width: 100%; max-width: 860px; background: #000; border-radius: 8px; overflow: hidden; box-shadow: 0 8px 40px rgba(0,0,0,.6); z-index: 1; }
.atsys-mov-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #1a1a1a; }
.atsys-mov-modal-title { color: #fff; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: calc(100% - 40px); }
.atsys-mov-modal-close { background: none; border: none; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px; opacity: .8; flex-shrink: 0; }
.atsys-mov-modal-close:hover { opacity: 1; }
.atsys-mov-modal-body { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.atsys-mov-modal-body iframe,
.atsys-mov-modal-body video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* ===== 初回視聴 Vimeo 再生バー隠蔽オーバーレイ ===== */
/* モーダル・単体プレイヤー共通。is-active が付いているときのみ表示 */
.atsys-mov-vimeo-overlay {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px; /* Vimeo コントロールバーを覆う高さ */
    background: #000;
    z-index: 10;
    pointer-events: auto; /* マウス操作をブロックしてシーク操作を防止 */
}
.atsys-mov-vimeo-overlay.is-active {
    display: block;
}
