/* DVTV 休日出勤管理 CSS - v2.6 */

/* ====== 共通 ====== */
.dvtv-hm-form-wrapper,
.dvtv-hm-list-wrapper,
.dvtv-hm-settings-wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.dvtv-hm-form-wrapper h3,
.dvtv-hm-list-wrapper h3,
.dvtv-hm-settings-wrapper h3 {
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #2271b1;
    color: #1d2327;
    font-size: 18px;
}

.dvtv-hm-settings-wrapper h4 {
    margin: 24px 0 12px;
    color: #1d2327;
    font-size: 15px;
}

/* 一覧日付リンク */
.dvtv-hm-table td.col-date a {
    color: #2271b1;
    text-decoration: none;
}
.dvtv-hm-table td.col-date a:hover {
    text-decoration: underline;
    color: #135e96;
}

/* ====== フォーム ====== */
.dvtv-hm-form-row {
    margin-bottom: 16px;
}

.dvtv-hm-form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #1d2327;
    font-size: 13px;
}

.dvtv-hm-form-row input[type="text"],
.dvtv-hm-form-row input[type="date"],
.dvtv-hm-form-row input[type="number"],
.dvtv-hm-form-row select,
.dvtv-hm-form-row textarea {
    width: 100%;
    max-width: 360px;
    padding: 10px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.dvtv-hm-form-row input:focus,
.dvtv-hm-form-row select:focus,
.dvtv-hm-form-row textarea:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.dvtv-hm-form-row textarea {
    max-width: 100%;
    resize: vertical;
}

.dvtv-hm-form-row .required {
    color: #d63638;
}

.dvtv-hm-readonly {
    display: inline-block;
    padding: 10px 12px;
    background: #f0f0f1;
    border-radius: 4px;
    color: #50575e;
    font-size: 14px;
}

.dvtv-hm-input-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dvtv-hm-input-inline input {
    width: 100px !important;
}

.dvtv-hm-input-inline span {
    color: #50575e;
    font-size: 13px;
}

.dvtv-hm-form-actions {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f1;
}

/* ====== ボタン ====== */
.dvtv-hm-btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.dvtv-hm-btn-primary:hover {
    background: #135e96;
}

.dvtv-hm-btn-outline {
    display: inline-block;
    padding: 10px 20px;
    background: #fff;
    color: #2271b1;
    border: 1px solid #2271b1;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.dvtv-hm-btn-outline:hover {
    background: #f6f7f7;
}

.dvtv-hm-btn-danger {
    display: inline-block;
    padding: 10px 20px;
    background: #d63638;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.dvtv-hm-btn-danger:hover {
    background: #b32d2e;
}

.dvtv-hm-back-btn {
    padding: 8px 16px;
    background: #f0f0f1;
    color: #50575e;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    cursor: pointer;
}

.dvtv-hm-submit-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.dvtv-hm-submit-btn:hover {
    background: #135e96;
}

/* ====== 結果・メッセージ ====== */
.dvtv-hm-result {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 4px;
    font-size: 14px;
}

.dvtv-hm-result.dvtv-hm-success {
    background: #edfaef;
    border: 1px solid #68de7c;
    color: #1e4620;
}

.dvtv-hm-result.dvtv-hm-error {
    background: #fcf0f1;
    border: 1px solid #d63638;
    color: #8a2424;
}

.dvtv-hm-hidden {
    display: none !important;
}

.dvtv-hm-error {
    color: #d63638;
    padding: 12px;
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    border-radius: 0 4px 4px 0;
}

.dvtv-hm-empty {
    color: #646970;
    padding: 24px;
    text-align: center;
    background: #f6f7f7;
    border-radius: 4px;
}

.dvtv-hm-hint {
    color: #646970;
    font-size: 12px;
    margin-top: 4px;
}

.dvtv-hm-muted {
    color: #a7aaad;
    font-size: 12px;
}

.dvtv-hm-loading {
    color: #646970;
    font-style: italic;
    padding: 16px;
    text-align: center;
}

/* ====== サマリー ====== */
.dvtv-hm-summary {
    padding: 16px;
    background: #f0f6fc;
    border-radius: 6px;
    margin-bottom: 20px;
}

.dvtv-hm-summary p {
    margin: 0;
    font-size: 14px;
}

.dvtv-hm-summary-bar {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 20px;
}

.dvtv-hm-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dvtv-hm-summary-label {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
}

.dvtv-hm-summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

/* ====== フィルターバー ====== */
.dvtv-hm-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f6f7f7;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* 管理画面: 2列×2行 */
.dvtv-hm-filter-admin .dvtv-hm-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* 個人画面: 3列1行 */
.dvtv-hm-filter-user .dvtv-hm-filter-row-single {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* ボタン行センター配置 */
.dvtv-hm-filter-actions-center {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
}

.dvtv-hm-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.dvtv-hm-filter-select {
    padding: 10px 14px;
    border: 2px solid #c3c4c7;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    min-width: 100px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* ブルーネオン点滅アニメーション */
@keyframes blueNeonPulse {
    0%, 100% {
        border-color: #2271b1;
        box-shadow: 0 0 5px rgba(34, 113, 177, 0.5), 0 0 10px rgba(34, 113, 177, 0.3);
    }
    50% {
        border-color: #00bfff;
        box-shadow: 0 0 10px rgba(0, 191, 255, 0.8), 0 0 20px rgba(0, 191, 255, 0.5), 0 0 30px rgba(0, 191, 255, 0.3);
    }
}

/* 選択時のブルーネオン点滅 */
.dvtv-hm-filter-select.neon-active {
    animation: blueNeonPulse 1.5s ease-in-out infinite;
    outline: none;
}

.dvtv-hm-filter-select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.3);
}

.dvtv-hm-filter-actions {
    display: flex;
    gap: 8px;
}

/* ====== テーブル ====== */
.dvtv-hm-table-wrap {
    overflow-x: auto;
    margin: 0 -8px;
    padding: 0 8px;
}

.dvtv-hm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dvtv-hm-table th,
.dvtv-hm-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #f0f0f1;
}

.dvtv-hm-table th {
    background: #f6f7f7;
    font-weight: 600;
    color: #1d2327;
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dvtv-hm-table tbody tr:hover {
    background: #f9f9f9;
}

.dvtv-hm-table .col-date {
    white-space: nowrap;
}

.dvtv-hm-table .col-type,
.dvtv-hm-table .col-hours,
.dvtv-hm-table .col-usage,
.dvtv-hm-table .col-payout {
    text-align: center;
}

.dvtv-hm-table .payout-done {
    color: #00a32a;
    font-weight: 600;
}

.usage-dates {
    font-size: 11px;
    color: #646970;
    margin-top: 4px;
}

/* ====== バッジ ====== */
.dvtv-hm-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.dvtv-hm-badge.status-available {
    background: #edfaef;
    color: #1e4620;
}

.dvtv-hm-badge.status-used {
    background: #f0f0f1;
    color: #50575e;
}

.dvtv-hm-badge.status-partial {
    background: #fcf9e8;
    color: #8a6d14;
}

/* ====== リストヘッダー ====== */
.dvtv-hm-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

.dvtv-hm-count {
    font-size: 13px;
    color: #50575e;
}

.dvtv-hm-page-info {
    font-size: 13px;
    color: #646970;
}

/* ====== ページネーション ====== */
.dvtv-hm-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f1;
}

.dvtv-hm-page-btn {
    padding: 8px 16px;
    background: #fff;
    color: #2271b1;
    border: 1px solid #2271b1;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.dvtv-hm-page-btn:hover {
    background: #2271b1;
    color: #fff;
}

.dvtv-hm-page-num {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

/* ====== チェックボックスラベル ====== */
.dvtv-hm-checkbox-label {
    display: block;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: #f6f7f7;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
}

.dvtv-hm-checkbox-label:hover {
    background: #e9e9ea;
}

.dvtv-hm-checkbox-label input {
    margin-right: 10px;
}

/* ====== スイッチ ====== */
.dvtv-hm-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.dvtv-hm-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.dvtv-hm-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #c3c4c7;
    transition: 0.3s;
    border-radius: 24px;
}

.dvtv-hm-switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.dvtv-hm-switch input:checked + .slider {
    background-color: #2271b1;
}

.dvtv-hm-switch input:checked + .slider:before {
    transform: translateX(20px);
}

.dvtv-hm-switch input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ====== 設定セクション ====== */
.dvtv-hm-settings-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f1;
}

.dvtv-hm-settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.dvtv-hm-sync-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.dvtv-hm-sync-month {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dvtv-hm-sync-month select {
    padding: 8px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 13px;
}

/* ====== 一括処理 ====== */
.dvtv-hm-bulk-form {
    margin-bottom: 20px;
}

/* ====== レスポンシブ ====== */
@media (max-width: 768px) {
    .dvtv-hm-form-wrapper,
    .dvtv-hm-list-wrapper,
    .dvtv-hm-settings-wrapper {
        padding: 16px;
    }
    
    .dvtv-hm-filter-bar {
        padding: 12px;
    }
    
    /* 管理画面: モバイルは1列 */
    .dvtv-hm-filter-admin .dvtv-hm-filter-row {
        grid-template-columns: 1fr;
    }
    
    /* 個人画面: モバイルは1列 */
    .dvtv-hm-filter-user .dvtv-hm-filter-row-single {
        grid-template-columns: 1fr;
    }
    
    .dvtv-hm-filter-select {
        width: 100%;
    }
    
    .dvtv-hm-filter-actions-center {
        flex-direction: row;
    }
    
    .dvtv-hm-filter-actions-center button {
        flex: 1;
    }
    
    .dvtv-hm-summary-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .dvtv-hm-table {
        font-size: 12px;
    }
    
    .dvtv-hm-table th,
    .dvtv-hm-table td {
        padding: 8px 6px;
    }
    
    .dvtv-hm-sync-actions,
    .dvtv-hm-sync-month {
        flex-direction: column;
    }
}
