/**
 * DVTV 承認ワークフロー v2.2.8
 */

/* 共通 */
.dvtv-notice { padding: 10px 14px; background: #f0f6fc; border-left: 3px solid #2271b1; color: #1d2327; font-size: 13px; }
.dvtv-status-badge { display: inline-block; padding: 4px 14px; border-radius: 3px; font-size: 14px; font-weight: 700; }
.status-approved { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }
.status-returned { background: #fff3cd; color: #856404; }
.status-pending { background: #cce5ff; color: #004085; }

/* 共通ボタン - 青/赤 */
.dvtv-btn-primary { display: inline-block; padding: 8px 20px; background: #2271b1; color: #fff !important; border: none; border-radius: 4px; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; }
.dvtv-btn-primary:hover { background: #1a5a8a; }
.dvtv-btn-danger { display: inline-block; padding: 6px 14px; background: #dc3545; color: #fff !important; border: none; border-radius: 4px; font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none; }
.dvtv-btn-danger:hover { background: #c82333; }

/* 承認ログテーブル */
.dvtv-approval-log { background: #fff; border: 1px solid #ccc; margin: 8px 0; font-size: 12px; }
.dvtv-log-note-top { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #f0f6fc; border-bottom: 1px solid #ccc; }
.dvtv-log-note-top .note-text { color: #666; font-size: 12px; }
.dvtv-final-approver-box { padding: 8px 12px; background: #e8f5e9; color: #2e7d32; font-weight: 600; font-size: 13px; border-top: 1px solid #ccc; }
.dvtv-log-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dvtv-log-table { width: 100%; border-collapse: collapse; font-size: 11px; min-width: 600px; }
.dvtv-log-table th, .dvtv-log-table td { padding: 5px 8px; text-align: center; border: 1px solid #ccc; white-space: nowrap; }
.dvtv-log-table th { font-weight: 600; color: #fff; font-size: 11px; }
.dvtv-log-table th.col-date { background: #556; font-size: 11px; min-width: 200px; white-space: nowrap; }
.dvtv-log-table th.step-a2z { background: #7b68ee; }
.dvtv-log-table th.step-a21 { background: #4169e1; }
.dvtv-log-table th.step-a22 { background: #20b2aa; }
.dvtv-log-table th.step-a23 { background: #66cdaa; }
.dvtv-log-table th.step-a24 { background: #f4a460; }
.dvtv-log-table td { background: #fff; font-size: 11px; }
.dvtv-log-table td.row-label { background: #e8e8f0; font-weight: 600; color: #336; width: 80px; }
.dvtv-log-table tr.row-next td { background: #fffde0; }
.dvtv-log-table tr.row-next td.row-label { background: #ffd700; color: #333; }
.dvtv-log-table .result-approved { color: #090; font-weight: 600; }
.dvtv-log-table .result-rejected { color: #c00; font-weight: 600; }
.dvtv-log-table .result-reapply { color: #f60; font-weight: 600; }
.dvtv-reject-reasons { padding: 8px 12px; background: #fff5f5; border-top: 1px solid #fcc; font-size: 11px; }
.dvtv-reject-reasons .reason-step { color: #c00; font-weight: 600; }

/* 承認フォーム */
.dvtv-approval-form { margin: 8px 0; }
.dvtv-form-toggle-btn { display: block; width: 100%; padding: 10px 16px; background: #2271b1; color: #fff; border: none; font-size: 14px; font-weight: 700; cursor: pointer; text-align: left; }
.dvtv-form-toggle-btn:hover { background: #1a5a8a; }
.dvtv-form-body { padding: 12px; background: #fff; border: 1px solid #ccc; border-top: none; }

/* アクションタブ - 1行表示、太字、選択時点滅 */
.dvtv-action-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.action-tab { flex: 1; cursor: pointer; }
.action-tab input { display: none; }
.action-tab .tab-box { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 8px; background: #f5f5f5; border: 2px solid #ddd; border-radius: 4px; transition: all 0.2s; }
.action-tab:hover .tab-box { background: #eee; border-color: #bbb; }
.action-tab .tab-icon { font-size: 22px; line-height: 1; }
.action-tab .tab-label { font-size: 15px; font-weight: 700; color: #333; white-space: nowrap; }

/* 承認して次へ / 最終承認 - 選択時は青背景+点滅 */
.action-tab.tab-approve.active .tab-box,
.action-tab.tab-finalize.active .tab-box { background: #1a5a8a; border-color: #1a5a8a; animation: tab-blink 1s infinite; }
.action-tab.tab-approve.active .tab-icon, .action-tab.tab-approve.active .tab-label,
.action-tab.tab-finalize.active .tab-icon, .action-tab.tab-finalize.active .tab-label { color: #fff; }

/* 差戻し - 選択時はピンク背景+点滅 */
.action-tab.tab-return.active .tab-box { background: #ff9999; border-color: #ff6666; animation: tab-blink 1s infinite; }
.action-tab.tab-return.active .tab-icon, .action-tab.tab-return.active .tab-label { color: #fff; }

/* 却下 - 選択時は赤背景+点滅 */
.action-tab.tab-reject.active .tab-box { background: #dc3545; border-color: #c82333; animation: tab-blink 1s infinite; }
.action-tab.tab-reject.active .tab-icon, .action-tab.tab-reject.active .tab-label { color: #fff; }

@keyframes tab-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

.dvtv-form-fields { margin-bottom: 12px; }
.field-group { margin-bottom: 10px; }
.field-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; color: #333; }
.field-group .required { color: #c00; font-size: 10px; }
.field-group .field-hint { color: #666; font-size: 10px; margin-top: 4px; }
.field-group select, .field-group textarea { width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 3px; font-size: 13px; }
.dvtv-form-actions { display: flex; align-items: center; justify-content: center; gap: 12px; }
.dvtv-finalize-only { text-align: center; padding: 15px; }
.finalize-notice { color: #f60; font-size: 13px; margin-bottom: 12px; }

/* 承認完了ダイアログ */
.dvtv-complete-dialog { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.dvtv-complete-dialog .dialog-content { background: #fff; padding: 30px 40px; border-radius: 8px; text-align: center; min-width: 300px; }
.dvtv-complete-dialog .dialog-icon { font-size: 48px; color: #28a745; margin-bottom: 10px; }
.dvtv-complete-dialog .dialog-message { font-size: 16px; font-weight: 600; margin-bottom: 20px; }
.dvtv-complete-dialog .dialog-buttons { display: flex; flex-direction: column; gap: 10px; }
.dvtv-complete-dialog .dialog-buttons .dvtv-btn-primary { width: 100%; }

/* 一覧表示 */
.dvtv-pending-list, .dvtv-my-requests { background: #fff; border: 1px solid #ccc; margin: 8px 0; }
.list-header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #343a40; color: #fff; }
.header-icon { font-size: 14px; }
.header-title { flex: 1; font-weight: 600; font-size: 13px; }
.header-title-sm { font-size: 11px; }
.header-count { background: rgba(255,255,255,0.2); padding: 2px 8px; border-radius: 10px; font-size: 10px; }
.btn-completed-popup { padding: 3px 10px; background: #28a745; color: #fff; border: none; border-radius: 4px; font-size: 10px; font-weight: 600; cursor: pointer; }
.btn-completed-popup:hover { background: #218838; }

/* 承認待ち1件以上で点滅 */
.list-header.blink-bg { animation: header-blink 1.5s infinite; }
@keyframes header-blink { 0%, 100% { background: #343a40; } 50% { background: #dc3545; } }

/* アコーディオン */
.accordion-header { cursor: pointer; user-select: none; }
.accordion-header:hover { background: #495057; }
.accordion-arrow { font-size: 12px; margin-left: auto; transition: transform 0.3s; }
.accordion-header.open .accordion-arrow { transform: rotate(180deg); }
.accordion-body { padding: 8px; max-height: 400px; overflow-y: auto; }

.list-body { padding: 8px; max-height: 400px; overflow-y: auto; }
.list-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; background: #f8f9fa; border-radius: 4px; margin-bottom: 6px; border-left: 3px solid transparent; }
.list-item.needs-action { background: #fff8e1; border-left-color: #f60; }
.list-item.alert-warning { background: #fff3cd; border-left-color: #f0ad4e; }
.list-item.alert-urgent { background: #f8d7da; border-left-color: #dc3545; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.7; } }
.item-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.item-badge { background: #6c757d; color: #fff; padding: 1px 6px; border-radius: 3px; font-size: 10px; }
.item-status { padding: 2px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; }
.alert-badge { background: #dc3545; color: #fff; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; }
.days-badge { background: #f0ad4e; color: #fff; padding: 1px 6px; border-radius: 3px; font-size: 10px; }
.item-title { color: #333; text-decoration: none; font-weight: 500; font-size: 13px; }
.item-title:hover { color: #2271b1; }
.item-date { color: #888; font-size: 11px; }
.item-actions { display: flex; gap: 4px; }
.item-btn, .btn-detail { padding: 5px 12px; background: #2271b1; color: #fff; border: none; border-radius: 3px; font-size: 11px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-edit { padding: 5px 12px; background: #2271b1; color: #fff; border: none; border-radius: 3px; font-size: 11px; font-weight: 700; text-decoration: none; }
.btn-delete { padding: 5px 12px; background: #dc3545; color: #fff; border: none; border-radius: 3px; font-size: 11px; font-weight: 700; cursor: pointer; }
.btn-resubmit { padding: 5px 12px; background: #2271b1; color: #fff; border: none; border-radius: 3px; font-size: 11px; font-weight: 700; cursor: pointer; }
.empty-message { text-align: center; color: #888; padding: 20px; font-size: 13px; }

/* 承認完了済ポップアップ */
.dvtv-completed-popup { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; }
.dvtv-completed-popup .popup-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); }
.dvtv-completed-popup .popup-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 8px; width: 90%; max-width: 900px; max-height: 85vh; display: flex; flex-direction: column; }
.dvtv-completed-popup .popup-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #28a745; color: #fff; border-radius: 8px 8px 0 0; }
.dvtv-completed-popup .popup-title { font-size: 16px; font-weight: 700; }
.dvtv-completed-popup .popup-close { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; line-height: 1; }

/* 検索エリア */
.dvtv-completed-popup .popup-search-area { padding: 12px 16px; border-bottom: 1px solid #eee; background: #f8f9fa; }
.dvtv-completed-popup .search-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.dvtv-completed-popup .search-row:last-child { margin-bottom: 0; }
.dvtv-completed-popup .search-field { display: flex; flex-direction: column; gap: 4px; }
.dvtv-completed-popup .search-field label { font-size: 11px; color: #666; font-weight: 600; }
.dvtv-completed-popup .search-field select,
.dvtv-completed-popup .search-field input[type="date"] { padding: 6px 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 12px; min-width: 140px; }
.dvtv-completed-popup .search-field-btn { align-self: flex-end; }
.dvtv-completed-popup .btn-search-reset { padding: 6px 14px; background: #6c757d; color: #fff; border: none; border-radius: 4px; font-size: 12px; cursor: pointer; }
.dvtv-completed-popup .btn-search-reset:hover { background: #5a6268; }
.dvtv-completed-popup .search-row input[type="text"] { flex: 1; padding: 8px 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; min-width: 200px; }

.dvtv-completed-popup .popup-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.dvtv-completed-popup .popup-pagination { padding: 10px 16px; border-top: 1px solid #eee; display: flex; align-items: center; justify-content: center; gap: 12px; }
.dvtv-completed-popup .page-info { color: #666; font-size: 12px; }
.dvtv-completed-popup .page-btn { padding: 6px 14px; background: #2271b1; color: #fff; border: none; border-radius: 4px; font-size: 12px; cursor: pointer; }
.dvtv-completed-popup .page-btn:hover { background: #1a5a8a; }
.dvtv-completed-popup .loading { text-align: center; color: #888; padding: 30px; }
.dvtv-completed-popup .completed-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dvtv-completed-popup .completed-table th, .dvtv-completed-popup .completed-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #eee; }
.dvtv-completed-popup .completed-table th { background: #f5f5f5; font-weight: 600; }
.dvtv-completed-popup .completed-table a { color: #2271b1; text-decoration: none; }
.dvtv-completed-popup .completed-table a:hover { text-decoration: underline; }

/* ダッシュボード */
.dvtv-dashboard { background: #fff; border: 1px solid #ccc; margin: 8px 0; }
.dashboard-header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #495057; color: #fff; }
.dashboard-stats { display: flex; gap: 10px; padding: 12px; }
.stat-card { flex: 1; text-align: center; padding: 12px; border-radius: 6px; }
.stat-card.pending { background: #e3f2fd; }
.stat-card.approved { background: #e8f5e9; }
.stat-card.rejected { background: #ffebee; }
.stat-card.returned { background: #fff8e1; }
.stat-num { font-size: 28px; font-weight: 700; color: #333; }
.stat-label { font-size: 12px; color: #666; }

/* 編集ログ */
.dvtv-edit-log { background: #fff; border: 1px solid #ccc; margin: 8px 0; }
.edit-log-header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #6c757d; color: #fff; font-weight: 600; font-size: 13px; }
.edit-log-body { padding: 8px; max-height: 200px; overflow-y: auto; }
.edit-log-item { display: flex; gap: 12px; padding: 6px 8px; border-bottom: 1px solid #eee; font-size: 12px; }
.edit-log-item:last-child { border-bottom: none; }
.log-date { color: #666; min-width: 130px; }
.log-user { color: #333; font-weight: 500; min-width: 80px; }
.log-action { color: #2271b1; }

/* 設定ボックス */
.dvtv-settings-box { background: #fff; border: 1px solid #ccc; border-radius: 4px; margin: 10px 0; }
.settings-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: #fff; font-weight: 600; font-size: 14px; }
.settings-header.orange { background: #e67e22; }
.settings-header.purple { background: #6c5ce7; }
.settings-header.green { background: #00b894; }
.settings-header.navy { background: #1e3a5f; }
.settings-header.blue { background: #2271b1; }
.settings-header.gray { background: #495057; }
.settings-body { padding: 12px; }
.settings-body .desc { color: #666; font-size: 12px; margin-bottom: 12px; }
.settings-body .empty { color: #999; text-align: center; padding: 15px; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px; max-height: 200px; overflow-y: auto; padding: 8px; background: #f9f9f9; border-radius: 4px; margin-bottom: 10px; }
.user-check { display: flex; align-items: center; gap: 4px; padding: 4px 6px; background: #fff; border: 1px solid #ddd; border-radius: 3px; font-size: 11px; cursor: pointer; }
.user-check:hover { border-color: #2271b1; }
.add-form { padding-top: 12px; border-top: 1px solid #eee; }
.add-form h4 { margin: 0 0 10px; font-size: 13px; }
.form-row { margin-bottom: 10px; }
.form-row label { font-size: 12px; font-weight: 600; margin-bottom: 4px; display: block; }
.form-row input[type="text"], .form-row select { width: 100%; max-width: 300px; padding: 6px 8px; border: 1px solid #ccc; border-radius: 3px; font-size: 12px; }
.form-row-inline { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.form-row-inline .form-field { flex: 1; min-width: 150px; }
.form-row-inline .form-field label { font-size: 11px; font-weight: 600; margin-bottom: 3px; display: block; }
.form-row-inline .form-field select { width: 100%; padding: 6px; font-size: 12px; }
.approvers-inline { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.approvers-inline select { width: 120px; padding: 4px; font-size: 11px; }
.arrow-sep { color: #999; margin: 0 2px; }
.user-settings-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 12px; }
.user-settings-table th, .user-settings-table td { padding: 6px 10px; border: 1px solid #ddd; text-align: left; }
.user-settings-table th { background: #f5f5f5; font-weight: 600; }
.user-settings-table td.center { text-align: center; }
.ur-tag { background: #e3f2fd; color: #1565c0; padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 600; }
.ur-arrow { color: #2271b1; font-weight: bold; }
.user-route-list, .delegate-list { margin-bottom: 12px; }
.user-route-item, .delegate-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #f8f9fa; border-radius: 4px; margin-bottom: 6px; font-size: 12px; }
.ur-user { background: #e3f2fd; padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.ur-approvers { flex: 1; color: #666; font-size: 11px; }
.d-from, .d-to { font-weight: 600; }
.d-arrow { color: #00b894; }
.d-period { color: #888; font-size: 11px; }
.d-status { padding: 2px 6px; border-radius: 3px; font-size: 10px; background: #e9ecef; color: #666; }
.d-status.active { background: #d4edda; color: #155724; }
.btn-del-route, .btn-del-delegate, .btn-del-ur { padding: 4px 10px; background: #dc3545; color: #fff; border: none; border-radius: 3px; font-size: 11px; font-weight: 700; cursor: pointer; }
.role-row { display: flex; align-items: center; gap: 12px; padding: 10px; background: #f8f9fa; border-radius: 4px; margin-bottom: 8px; }
.role-row label { font-weight: 600; min-width: 100px; font-size: 13px; }
.role-row select { flex: 1; max-width: 250px; padding: 6px; font-size: 12px; }
.period-dates { margin-top: 8px; }
.period-dates input { padding: 4px 6px; font-size: 12px; }

/* レスポンシブ */
@media (max-width: 600px) {
    .dvtv-log-table { font-size: 10px; }
    .dvtv-log-table th, .dvtv-log-table td { padding: 3px 4px; }
    .dvtv-log-table th.col-date { min-width: 140px; }
    .dvtv-action-tabs { flex-wrap: wrap; }
    .action-tab { min-width: 45%; }
    .form-row-inline { flex-direction: column; }
    .user-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-stats { flex-wrap: wrap; }
    .stat-card { min-width: 45%; }
    .dvtv-completed-popup .popup-content { width: 95%; }
}

/* 再申請/削除ボタンエリア（投稿ページ用） */
.dvtv-resubmit-buttons { background: #fff8e1; border: 1px solid #f0ad4e; border-radius: 4px; padding: 15px; margin: 10px 0; }
.dvtv-resubmit-buttons .resubmit-notice { color: #856404; font-size: 13px; margin: 0 0 12px 0; }
.dvtv-resubmit-buttons .resubmit-actions { display: flex; gap: 10px; }

/* ダッシュボード詳細テーブル */
.dashboard-section { margin-top: 15px; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.section-header { padding: 10px 12px; color: #fff; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.section-header.pending { background: #2271b1; }
.section-header.approved { background: #28a745; }
.section-header.rejected { background: #dc3545; }
.section-header.returned { background: #f0ad4e; }
.section-body { max-height: 300px; overflow-y: auto; }
.dashboard-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dashboard-table th, .dashboard-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #eee; }
.dashboard-table th { background: #f5f5f5; font-weight: 600; position: sticky; top: 0; }
.dashboard-table tbody tr:hover { background: #f9f9f9; }
.dashboard-table a { color: #2271b1; text-decoration: none; }
.dashboard-table a:hover { text-decoration: underline; }
.step-badge { background: #6c757d; color: #fff; padding: 2px 8px; border-radius: 3px; font-size: 10px; }
.btn-detail-sm { display: inline-block; padding: 3px 10px; background: #2271b1; color: #fff !important; border-radius: 3px; font-size: 11px; font-weight: 600; text-decoration: none !important; }

/* エラーメッセージ */
.field-error { color: #dc3545; font-size: 12px; background: #fff5f5; padding: 8px 12px; border-radius: 4px; border-left: 3px solid #dc3545; }


/* =====================================================
   モダンステップカード型 承認ログ v2.3.1
   工事承認と完全一致デザイン
   ===================================================== */

.awf-log-wrap { background: #fff; border: 1px solid #d1d5db; border-radius: 10px; margin: 8px 0; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

/* ヘッダー */
.awf-log-header { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: #f8fafc; border-bottom: 1px solid #e5e7eb; flex-wrap: wrap; }
.awf-log-status { font-size: 14px; font-weight: 700; padding: 5px 16px; border-radius: 6px; }
.awf-log-desc { font-size: 12px; color: #6b7280; }
.awf-log-date { font-size: 12px; color: #6b7280; margin-left: auto; }

/* ステータスバー（承認済のみ） */
.awf-status-bar { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 3px solid #16a34a; }
.awf-status-big { font-size: 24px; font-weight: 800; color: #dc2626; border: 3px solid #dc2626; padding: 6px 20px; border-radius: 6px; }
.awf-status-final { font-size: 18px; color: #374151; }
.awf-status-final strong { color: #111827; font-weight: 800; }

/* ステップトラック */
.awf-steps-outer { padding: 20px 16px 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.awf-steps-track { display: flex; flex-direction: row-reverse; align-items: flex-start; justify-content: center; min-width: fit-content; gap: 0; }

/* 各ステップカラム */
.awf-col { display: flex; flex-direction: column; align-items: center; min-width: 120px; max-width: 160px; flex: 1; position: relative; }

/* ◀コネクター */
.awf-cvs { display: flex; align-items: center; gap: 2px; padding-top: 30px; min-width: 30px; }
.awf-cv { font-size: 11px; line-height: 1; }
.awf-cv.cv-ok { color: #16a34a; }
.awf-cv.cv-go { color: #2563eb; animation: awf-flow 1.2s infinite; }
.awf-cv.cv-off { color: #d1d5db; }
@keyframes awf-flow { 0% { opacity: 0.2; } 50% { opacity: 1; } 100% { opacity: 0.2; } }
.awf-cvs .awf-cv.cv-go:nth-child(1) { animation-delay: 0s; }
.awf-cvs .awf-cv.cv-go:nth-child(2) { animation-delay: 0.3s; }
.awf-cvs .awf-cv.cv-go:nth-child(3) { animation-delay: 0.6s; }

/* ▼ 承認待ち ▼ ラベル（濃い色・強い点滅） */
.awf-here { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 4px; margin-bottom: 5px; white-space: nowrap; background: #2563eb; color: #fff; animation: awf-blink-strong 0.8s ease-in-out infinite; }
.awf-here-ng { background: #dc2626; }
@keyframes awf-blink-strong { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

/* 丸アイコン（大きめ・濃い色） */
.awf-ic { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 7px; position: relative; z-index: 1; }
.awf-ic svg { width: 24px; height: 24px; }
.awf-ic-active { background: #1e40af; animation: awf-pulse 2s ease-in-out infinite; }
.awf-ic-return { background: #dc2626; animation: awf-blink-strong 0.8s ease-in-out infinite; }
.awf-ic-reject { background: #dc2626; animation: awf-blink-strong 0.8s ease-in-out infinite; }
.awf-ic-wait { background: #d1d5db; }
@keyframes awf-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(30,64,175,0.5); } 50% { box-shadow: 0 0 0 10px rgba(30,64,175,0); } }

/* ステップ名ラベル */
.awf-sn { font-size: 12px; font-weight: 700; color: #fff; padding: 4px 12px; border-radius: 5px; margin-bottom: 7px; white-space: nowrap; }

/* カード共通 */
.awf-cd { width: 100%; border-radius: 8px; padding: 8px 10px; font-size: 12px; background: #f9fafb; border: 1px solid #e5e7eb; }
.awf-cd-active { background: #eff6ff; border: 2px solid #2563eb; text-align: center; }
.awf-cd-ng { background: #fef2f2; border: 2px solid #dc2626; }
.awf-cd-empty { background: #f3f4f6; border: 1px solid #d1d5db; }

.awf-cr { display: flex; justify-content: space-between; align-items: center; padding: 2px 0; }
.awf-cl { color: #6b7280; font-size: 11px; font-weight: 500; }
.awf-vk { color: #111827; font-weight: 600; font-size: 12px; }

/* 結果バッジ（暗い背景） */
.awf-result-badge { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; background: #374151; color: #fff; }
.awf-result-ng { background: #dc2626; }

/* 待機中バッジ */
.awf-wait-badge { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; background: #e5e7eb; color: #6b7280; }

/* 経過時間 */
.awf-el { display: flex; align-items: center; gap: 3px; color: #6b7280; font-size: 11px; margin-top: 4px; justify-content: center; }
.awf-el svg { width: 13px; height: 13px; }

/* 承認待ちカード内 */
.awf-active-name { font-size: 16px; font-weight: 800; color: #111827; padding: 4px 0; }
.awf-active-elapsed { font-size: 13px; font-weight: 700; color: #dc2626; padding: 2px 0; }

/* →次の承認者 */
.awf-nx-from { font-size: 11px; color: #16a34a; margin-top: 4px; text-align: center; font-weight: 600; }

/* 下部バー */
.awf-nxbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; background: #2563eb; color: #fff; font-size: 14px; font-weight: 600; }
.awf-nxbar-left { display: flex; align-items: center; gap: 8px; }
.awf-nxbar-left svg { width: 20px; height: 20px; }
.awf-nxbar .awf-nm { font-weight: 800; font-size: 16px; background: rgba(255,255,255,0.2); padding: 2px 12px; border-radius: 4px; margin-left: 4px; }
.awf-nxbar-right { font-size: 12px; font-weight: 500; opacity: 0.9; }
.awf-nxbar-ng { background: #dc2626; }

/* 差戻理由 */
.awf-reasons { padding: 12px 18px; background: #fef2f2; border-top: 1px solid #fecaca; }
.awf-reasons-title { font-size: 14px; font-weight: 700; color: #991b1b; margin: 0 0 10px; }
.awf-reason-item { background: #fff; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.awf-reason-header { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; font-size: 12px; }
.awf-reason-step { background: #fee2e2; color: #991b1b; padding: 2px 10px; border-radius: 4px; font-weight: 700; }
.awf-reason-by { color: #111827; font-weight: 600; }
.awf-reason-date { color: #6b7280; font-size: 11px; }
.awf-reason-text { font-size: 13px; color: #374151; line-height: 1.6; }

/* レスポンシブ */
@media (max-width: 600px) {
    .awf-steps-outer { padding: 12px 8px 8px; }
    .awf-col { min-width: 90px; max-width: 130px; }
    .awf-ic { width: 42px; height: 42px; }
    .awf-ic svg { width: 20px; height: 20px; }
    .awf-sn { font-size: 10px; padding: 3px 8px; }
    .awf-cd { padding: 6px 8px; font-size: 11px; }
    .awf-cvs { min-width: 22px; }
    .awf-cv { font-size: 9px; }
    .awf-log-desc { display: none; }
    .awf-status-big { font-size: 18px; padding: 4px 14px; }
    .awf-nxbar { flex-direction: column; gap: 4px; align-items: flex-start; }
}
