/* ===================================
   WP Task Manager - フロントエンドCSS
   スマホ最適化
   =================================== */

/* iOS自動ズーム防止: 全フォーム要素を16px以上に */
#wptm-front-app input[type="text"],
#wptm-front-app input[type="number"],
#wptm-front-app input[type="date"],
#wptm-front-app input[type="email"],
#wptm-front-app input[type="tel"],
#wptm-front-app input[type="url"],
#wptm-front-app textarea,
#wptm-front-app select {
    font-size: 16px !important;
    -webkit-appearance: none;
    touch-action: manipulation;
}

#wptm-front-app {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px 80px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
    position: relative;
    min-height: 100vh;
}

/* ヘッダー */
.wptm-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d52 100%);
    margin: 0 -16px;
    padding: 16px 16px 0;
}

.wptm-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wptm-page-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #fff;
    letter-spacing: 0.5px;
}

.wptm-logout-btn {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 14px;
    margin-bottom: 12px;
    transition: color 0.2s, border-color 0.2s;
}
.wptm-logout-btn:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

.wptm-sheet-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
}

.wptm-section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px;
}

.wptm-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: none;
}

.wptm-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.wptm-tab.active {
    color: #fff;
    border-bottom-color: #fff;
}

/* フィルターチップ */
.wptm-status-filters {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wptm-chip {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.wptm-chip.active {
    background: #4361ee;
    color: #fff;
    border-color: #4361ee;
}

/* タスクカード */
.wptm-task-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* プロジェクトグループ */
.wptm-project-group {
    margin-bottom: 16px;
}

.wptm-project-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: transparent;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    margin-bottom: 8px;
}

.wptm-project-group-header:active {
    background: #f8f9fa;
}

.wptm-project-group-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.wptm-project-group-arrow {
    font-size: 10px;
    display: inline-block;
    transition: transform 0.2s;
}

.wptm-project-group.collapsed .wptm-project-group-arrow {
    transform: rotate(-90deg);
}

.wptm-project-group-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #999;
}

.wptm-project-group-tasks {
    padding-left: 8px;
}

.wptm-project-group.collapsed .wptm-project-group-tasks {
    display: none;
}

.wptm-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    border-left: 4px solid transparent;
}

.wptm-card:active {
    transform: scale(0.98);
}

.wptm-card-priority-high {
    border-left-color: #e63946;
}

.wptm-card-priority-medium {
    border-left-color: #f4a261;
}

.wptm-card-priority-low {
    border-left-color: #a8dadc;
}

.wptm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.wptm-card-project {
    font-size: 11px;
    color: #4361ee;
    font-weight: 600;
    margin-bottom: 2px;
}

.wptm-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.wptm-card-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 8px;
}

.wptm-card-badge-todo {
    background: #f0f0f0;
    color: #666;
}

.wptm-card-badge-in_progress {
    background: #fff3cd;
    color: #856404;
}

.wptm-card-badge-done {
    background: #d4edda;
    color: #155724;
}

.wptm-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.wptm-card-score {
    color: #4361ee;
    font-weight: 700;
}

.wptm-card-overdue {
    color: #e63946;
    font-weight: 600;
}

/* カード内プログレスバー */
.wptm-card-progress {
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
}

.wptm-card-progress-fill {
    height: 100%;
    background: #4361ee;
    border-radius: 2px;
    transition: width 0.3s;
}

/* タスク詳細パネル */
.wptm-detail-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f8f9fa;
    z-index: 10000;
    overflow-y: auto;
    padding: 0 16px 80px;
    max-width: 480px;
    margin: 0 auto;
}

.wptm-detail-header {
    padding: 16px 0 8px;
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 1;
}

.wptm-back-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: #4361ee;
    cursor: pointer;
    padding: 4px 0;
}

.wptm-detail-title {
    font-size: 20px;
    font-weight: 700;
    margin: 8px 0;
}

.wptm-detail-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}

.wptm-detail-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.wptm-detail-info-item {
    background: #fff;
    padding: 10px 12px;
    border-radius: 8px;
}

.wptm-detail-info-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 2px;
}

.wptm-detail-info-value {
    font-size: 14px;
    font-weight: 600;
}

/* 工程リスト */

.wptm-step-card {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    gap: 10px;
}

.wptm-step-check {
    width: 22px;
    height: 22px;
    border: 2px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.wptm-step-check.checked {
    background: #4361ee;
    border-color: #4361ee;
    color: #fff;
}

.wptm-step-card-title {
    flex: 1;
    font-size: 14px;
}

.wptm-step-card.done .wptm-step-card-title {
    text-decoration: line-through;
    color: #999;
}

.wptm-step-card-hours {
    font-size: 12px;
    color: #999;
}

/* 工程追加 */
.wptm-add-step-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.wptm-add-step-row input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    -webkit-appearance: none;
    touch-action: manipulation;
}

.wptm-add-step-row button {
    padding: 10px 16px;
    background: #4361ee;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* ステータス変更ボタン */
.wptm-status-btns {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.wptm-status-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.wptm-status-btn.active {
    background: #4361ee;
    color: #fff;
    border-color: #4361ee;
}

/* カレンダー */
.wptm-cal-mode-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 8px;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 2px;
    width: fit-content;
}

.wptm-cal-mode-btn {
    padding: 6px 16px;
    border: none;
    background: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
}

.wptm-cal-mode-btn.active {
    background: #fff;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.wptm-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.wptm-cal-nav {
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 16px;
}

#wptm-cal-month {
    font-size: 16px;
    font-weight: 600;
}

.wptm-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.wptm-cal-day-header {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    padding: 8px 0;
}

.wptm-cal-day {
    min-height: 56px;
    padding: 4px;
    background: #fff;
    border-radius: 4px;
    font-size: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.15s;
}

.wptm-cal-day:active {
    background: #f0f0ff;
}

.wptm-cal-day-num {
    font-weight: 600;
    font-size: 11px;
    color: #666;
}

.wptm-cal-day.today .wptm-cal-day-num {
    background: #4361ee;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wptm-cal-day.other-month {
    opacity: 0.3;
    cursor: default;
}

.wptm-cal-day.wptm-cal-holiday {
    background: #f0f0f0;
}

.wptm-cal-day.wptm-cal-holiday .wptm-cal-day-num {
    color: #bbb;
}

/* カレンダー内の作業量バー */
.wptm-cal-bar {
    height: 3px;
    border-radius: 2px;
    margin-top: 3px;
    min-width: 4px;
    transition: width 0.3s;
}

.wptm-cal-hours {
    display: block;
    font-size: 9px;
    color: #888;
    margin-top: 1px;
    line-height: 1;
}

/* 週表示 */
.wptm-week-mode {
    grid-template-columns: repeat(7, 1fr);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wptm-week-mode .wptm-cal-day-header,
.wptm-week-mode .wptm-cal-day {
    min-width: 120px;
}

.wptm-week-mode .wptm-cal-day {
    min-height: 120px;
}

.wptm-week-task {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    padding: 3px 2px;
    margin-top: 2px;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.3;
    background: #f8f9fa;
}

.wptm-week-task:active {
    background: #e8e9ea;
}

.wptm-week-task-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
}

.wptm-week-task-name {
    flex: 1;
    min-width: 0;
    color: #333;
    word-break: break-all;
    white-space: normal;
}

.wptm-week-task-hours {
    flex-shrink: 0;
    color: #999;
    font-size: 9px;
    margin-top: 1px;
}

/* スケジュール警告 */
.wptm-schedule-warnings {
    margin-top: 12px;
}

.wptm-schedule-warning {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 6px;
}

.wptm-schedule-warning-clickable {
    cursor: pointer;
}

.wptm-schedule-warning-clickable:active {
    background: #ffe69c;
}

/* 日別作業時間変更 */
.wptm-day-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.wptm-day-nav .wptm-detail-title {
    flex: 1;
    text-align: center;
}

.wptm-day-title-line {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 1px;
}

.wptm-day-title-big {
    font-size: 28px;
    font-weight: 800;
    color: #222;
    line-height: 1;
}

.wptm-day-title-small {
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

.wptm-day-nav-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    color: #4361ee;
    cursor: pointer;
    white-space: nowrap;
}

.wptm-day-nav-btn:active {
    background: #f0f0ff;
}

.wptm-day-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.wptm-day-action-btn {
    flex: 1;
    padding: 10px 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}

.wptm-day-action-btn:active {
    background: #f0f0f0;
}

.wptm-day-action-holiday {
    color: #e63946;
    border-color: #f8d7da;
}

.wptm-day-action-holiday:active {
    background: #fff5f5;
}

.wptm-day-action-workday {
    color: #4361ee;
    border-color: #d0d7ff;
}

.wptm-day-action-workday:active {
    background: #f0f0ff;
}

.wptm-day-hours-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 12px;
}

.wptm-day-hours-btn {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}

.wptm-day-hours-btn:active {
    background: #4361ee;
    color: #fff;
    border-color: #4361ee;
}

/* 日別詳細 */
.wptm-day-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.wptm-day-summary-bar {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.wptm-day-summary-fill {
    height: 100%;
    background: #4361ee;
    border-radius: 4px;
    transition: width 0.3s;
}

.wptm-day-summary-text {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.wptm-day-tasks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wptm-day-task-item {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
}

.wptm-day-task-main {
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 12px;
}

.wptm-day-task-main:active {
    background: #f0f4ff;
}

.wptm-postpone-btn {
    display: block;
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    color: #4361ee;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.wptm-postpone-btn:active {
    background: #eef0ff;
}

.wptm-day-task-actions {
    display: flex;
    border-top: 1px solid #f0f0f0;
}

.wptm-complete-btn {
    display: block;
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-right: 1px solid #f0f0f0;
    background: #fafafa;
    color: #27ae60;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.wptm-complete-btn:active {
    background: #eaffea;
}

/* 完了固定タスク */
.wptm-day-task-fixed {
    opacity: 0.7;
    background: #f0fff0;
}

.wptm-day-task-fixed .wptm-day-task-main {
    cursor: default;
}

.wptm-undo-complete {
    border-top: 1px solid #d4edda;
}

.wptm-undo-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: #fff5f5;
    color: #e63946;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.wptm-undo-btn:active {
    background: #ffe0e0;
}

.wptm-day-task-rank {
    min-width: 28px;
    height: 28px;
    border-radius: 14px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 6px;
}

.wptm-day-task-arrow {
    font-size: 20px;
    color: #ccc;
    flex-shrink: 0;
}

.wptm-day-task-info {
    flex: 1;
}

.wptm-day-task-project {
    font-size: 11px;
    color: #4361ee;
    font-weight: 600;
}

.wptm-day-task-parent {
    font-size: 12px;
    color: #888;
    margin-top: 1px;
}

.wptm-day-task-name {
    font-size: 15px;
    font-weight: 700;
    margin-top: 2px;
}

.wptm-day-task-meta {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* スケジュールエントリー（日次詳細用） */
.wptm-day-detail {
    padding: 8px 0;
}

.wptm-day-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wptm-day-detail-date {
    font-size: 18px;
    font-weight: 700;
}

.wptm-day-detail-summary {
    font-size: 14px;
    font-weight: 600;
}

.wptm-day-progress {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.wptm-day-progress-fill {
    height: 100%;
    background: #4361ee;
    border-radius: 4px;
    transition: width 0.3s;
}

.wptm-day-progress-fill.over {
    background: #e63946;
}

.wptm-schedule-entries {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wptm-schedule-entry {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 12px;
    border-radius: 10px;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.15s;
}

.wptm-schedule-entry:active {
    transform: scale(0.98);
}

.wptm-schedule-entry-score {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wptm-schedule-entry-info {
    flex: 1;
    min-width: 0;
}

.wptm-schedule-entry-title {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wptm-schedule-entry-meta {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.wptm-schedule-entry-hours {
    font-size: 16px;
    font-weight: 700;
    color: #4361ee;
    flex-shrink: 0;
}

.wptm-cal-hours.over {
    color: #e63946;
}

.wptm-warning {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 6px;
}

/* FAB */
.wptm-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #4361ee;
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.4);
    z-index: 9999;
    transition: transform 0.2s;
}

.wptm-fab:active {
    transform: scale(0.92);
}

/* ポップアップモーダル */
.wptm-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: wptmFadeInOverlay 0.2s ease;
}

@keyframes wptmFadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wptm-popup {
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px;
    width: 100%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: wptmPopupIn 0.25s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

@keyframes wptmPopupIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.wptm-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.wptm-popup-close:hover,
.wptm-popup-close:active {
    color: #333;
}

/* フォーム */
.wptm-form-group {
    margin-bottom: 12px;
}

.wptm-form-group label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.wptm-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    -webkit-appearance: none;
    touch-action: manipulation;
}

.wptm-input:focus {
    outline: none;
    border-color: #4361ee;
}

.wptm-form-row {
    display: flex;
    gap: 12px;
}

.wptm-half {
    flex: 1;
}

.wptm-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.wptm-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}

.wptm-btn-primary {
    background: #4361ee;
    color: #fff;
}

.wptm-btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.wptm-btn-danger {
    background: #fff;
    color: #e63946;
    border: 1px solid #e63946;
}

/* ローディング・空状態 */
.wptm-loading, .wptm-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.wptm-login-msg {
    text-align: center;
    padding: 40px 20px;
}

.wptm-login-msg a {
    color: #4361ee;
}

/* 削除ボタン */
.wptm-delete-task-btn {
    width: 100%;
    margin-top: 20px;
}

/* ===================================
   作業時間オーバーライド表示
   =================================== */
.wptm-day-override-banner {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 1px solid #ffb74d;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
}
.wptm-day-override-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.wptm-override-icon {
    font-size: 16px;
}
.wptm-override-label {
    font-size: 13px;
    color: #e65100;
}
.wptm-override-label strong {
    font-size: 15px;
}
.wptm-override-default {
    font-size: 11px;
    color: #bf360c;
    opacity: 0.7;
}
.wptm-override-reset-btn {
    margin-left: auto;
    background: rgba(230, 81, 0, 0.12);
    border: 1px solid rgba(230, 81, 0, 0.3);
    color: #e65100;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 14px;
    cursor: pointer;
}
.wptm-day-override-reason {
    font-size: 12px;
    color: #5d4037;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(230, 81, 0, 0.2);
    line-height: 1.5;
}

/* 時間選択ピッカー改善 */
.wptm-day-hours-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}
.wptm-day-hours-btn.wptm-hours-btn-active {
    background: #4361ee !important;
    color: #fff !important;
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.35);
}
.wptm-day-hours-reason {
    margin-top: 12px;
}
.wptm-day-hours-reason input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.wptm-day-hours-reason input:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
}
.wptm-day-hours-reason input::placeholder {
    color: #bbb;
}
.wptm-day-hours-actions {
    margin-top: 10px;
    text-align: center;
}
.wptm-hours-confirm-btn {
    background: #4361ee;
    color: #fff;
    border: none;
    padding: 10px 32px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}
.wptm-hours-confirm-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}
.wptm-hours-confirm-btn:not(:disabled):hover {
    background: #3451d1;
}

/* ===================================
   定期作業UI
   =================================== */
.wptm-recurring-day-wrap {
    padding: 8px 0;
}
.wptm-recurring-info {
    padding: 4px 0;
}
.wptm-recurring-hint {
    font-size: 11px;
    color: #888;
    line-height: 1.5;
}

/* ===================================
   今日のタスクビュー
   =================================== */
.wptm-today-header {
    text-align: center;
    padding: 20px 0 12px;
}
.wptm-today-date {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}
.wptm-today-month {
    font-size: 14px;
    color: #666;
}
.wptm-today-day {
    font-size: 40px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1;
}
.wptm-today-dow {
    font-size: 14px;
    color: #666;
}
.wptm-today-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* ===================================
   前日ボタン・長押しメニュー
   =================================== */
.wptm-postpone-back-btn {
    background: #f0f0f5;
    color: #666;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    flex: 1;
}
.wptm-day-task-actions {
    display: flex;
    gap: 6px;
}
.wptm-longpress-actions {
    padding: 8px 0 4px;
    border-top: 1px dashed #e0e0e0;
    margin-top: 6px;
}
.wptm-finish-task-btn {
    width: 100%;
    background: linear-gradient(135deg, #e63946 0%, #c0392b 100%);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
