/* ==========================================================================
   MAERS Schedule — 页面样式 (schedule.css)
   ========================================================================== */

/* === Header === */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.app-header h1 {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 9px;
  color: #f0f0f2;
}
.app-header h1 .title-sch {
  background: linear-gradient(135deg, #f0f0f2 20%, #b2a7f5 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.app-header h1 .app-title-icon { flex-shrink: 0; }
.header-actions { display: flex; gap: 8px; align-items: center; }

/* === View Tabs === */
.view-tabs {
  display: flex; gap: 4px; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px;
}
.view-tab {
  padding: 6px 16px; border-radius: 16px; border: none; background: none;
  color: var(--text-sub); font-family: var(--font); font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.view-tab.active {
  background: var(--accent); color: #fff; font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.view-tab:hover:not(.active) { background: var(--bg-input-focus); color: var(--text-main); }

/* === Add Task Button === */
.add-task-btn {
  padding: 8px 18px; background: var(--accent); border: none; border-radius: 20px;
  color: #fff; font-family: var(--font); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition); letter-spacing: 0.02em;
}
.add-task-btn:hover { background: #6b5ad6; box-shadow: 0 4px 16px var(--accent-glow); transform: translateY(-1px); }

/* Export/Import icon buttons */
.header-icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text-sub); cursor: pointer;
  font-size: 0.9rem; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.header-icon-btn:hover { border-color: var(--accent); color: var(--text-main); background: rgba(124,106,239,0.08); }

/* === Quadrant Matrix === */
.matrix-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.matrix-axis-label {
  text-align: center; font-size: 0.7rem; color: var(--text-dim); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; padding: 6px 0;
}
.matrix-row-label {
  writing-mode: vertical-lr; text-orientation: mixed; transform: rotate(180deg);
  font-size: 0.7rem; color: var(--text-dim); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.quadrant {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; min-height: 200px; transition: all var(--transition);
  display: flex; flex-direction: column;
}
.quadrant:hover { border-color: var(--border-focus); }
.quadrant-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.quadrant-title {
  font-size: 0.78rem; font-weight: 600; display: flex; align-items: center; gap: 6px;
}
.quadrant-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.quadrant-count {
  font-size: 0.68rem; color: var(--text-dim); background: var(--bg-input);
  padding: 2px 8px; border-radius: 10px;
}
.quadrant-body {
  flex: 1; display: flex; flex-direction: column; gap: 6px;
  min-height: 60px;
}
.quadrant-body.drag-over {
  background: rgba(124, 106, 239, 0.06); border-radius: 8px;
}
.quadrant-empty {
  color: var(--text-dim); font-size: 0.78rem; text-align: center;
  padding: 20px 0; opacity: 0.6;
}

/* Quadrant color accents */
.quadrant[data-q="do"] .quadrant-dot { background: var(--q-do); }
.quadrant[data-q="plan"] .quadrant-dot { background: var(--q-plan); }
.quadrant[data-q="delegate"] .quadrant-dot { background: var(--q-delegate); }
.quadrant[data-q="eliminate"] .quadrant-dot { background: var(--q-eliminate); }
.quadrant[data-q="do"] { border-top: 2px solid var(--q-do); }
.quadrant[data-q="plan"] { border-top: 2px solid var(--q-plan); }
.quadrant[data-q="delegate"] { border-top: 2px solid var(--q-delegate); }
.quadrant[data-q="eliminate"] { border-top: 2px solid var(--q-eliminate); }

/* === Task Item === */
.task-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; background: var(--bg-input); border: 1px solid transparent;
  border-radius: 8px; cursor: grab; transition: all var(--transition);
  user-select: none;
}
.task-item:hover { border-color: var(--border-focus); background: var(--bg-input-focus); }
.task-item.dragging { opacity: 0.5; cursor: grabbing; }
.task-item.done { opacity: 0.5; }
.task-item.done .task-title { text-decoration: line-through; color: var(--text-dim); }

.task-check {
  width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--text-dim);
  background: none; cursor: pointer; flex-shrink: 0; margin-top: 2px;
  transition: all var(--transition); display: flex; align-items: center; justify-content: center;
}
.task-check:hover { border-color: var(--accent); }
.task-check.checked {
  background: var(--accent); border-color: var(--accent);
}
.task-check.checked::after {
  content: '✓'; color: #fff; font-size: 0.65rem; font-weight: 700;
}

.task-info { flex: 1; min-width: 0; }
.task-title { font-size: 0.82rem; color: var(--text-main); font-weight: 500; word-break: break-word; }
.task-meta {
  display: flex; gap: 8px; margin-top: 3px; font-size: 0.68rem; color: var(--text-dim);
  align-items: center; flex-wrap: wrap;
}
.task-deadline { color: var(--warning); }
.task-deadline.overdue { color: var(--danger); }
.task-ql-badge {
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(124, 106, 239, 0.12); color: var(--accent);
  padding: 1px 6px; border-radius: 8px; font-size: 0.65rem;
}
.task-tier-badge {
  padding: 1px 6px; border-radius: 8px; font-size: 0.65rem; font-weight: 500;
}
.task-tier-badge[data-tier="short"] { background: rgba(96, 165, 250, 0.15); color: var(--info); }
.task-tier-badge[data-tier="mid"] { background: rgba(251, 191, 36, 0.15); color: var(--warning); }
.task-tier-badge[data-tier="long"] { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }

.task-actions {
  display: flex; gap: 2px; opacity: 0; transition: opacity var(--transition);
}
.task-item:hover .task-actions { opacity: 1; }
.task-action-btn {
  background: none; border: none; color: var(--text-dim); cursor: pointer;
  padding: 2px 4px; font-size: 0.8rem; border-radius: 4px;
  transition: all var(--transition); line-height: 1;
}
.task-action-btn:hover { color: var(--text-main); background: var(--bg-input); }
.task-action-btn.del:hover { color: var(--danger); background: rgba(248,113,113,0.1); }

/* === Timeline View === */
.timeline-view { display: none; }
.timeline-view.active { display: block; }
.matrix-view.active { display: grid; }

.timeline-section {
  margin-bottom: 28px;
}
.timeline-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.timeline-title {
  font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 8px;
}
img[src*="mid.svg"], img[src*="long.svg"] { filter: brightness(1.25) saturate(1.2); }
.timeline-icon { font-size: 1.1rem; }
.timeline-count {
  font-size: 0.68rem; color: var(--text-dim); background: var(--bg-input);
  padding: 2px 8px; border-radius: 10px;
}
.timeline-add-btn {
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 20px;
  color: var(--text-sub); font-family: var(--font); font-size: 0.75rem;
  padding: 4px 12px; cursor: pointer; transition: all var(--transition);
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.timeline-add-btn:hover { border-color: var(--accent); color: var(--accent); }

.matrix-add-btn {
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-sub); font-family: var(--font); font-size: 0.85rem;
  width: 20px; height: 20px; cursor: pointer; transition: all var(--transition);
  display: inline-flex; align-items: center; justify-content: center; line-height: 0;
  padding-bottom: 1px; /* Optical adjustment for + sign */
}
.matrix-add-btn:hover { border-color: var(--accent); color: var(--accent); }

.timeline-list {
  display: flex; flex-direction: column; gap: 6px;
}
.timeline-empty {
  text-align: center; padding: 24px; color: var(--text-dim);
  font-size: 0.82rem; border: 1px dashed var(--border); border-radius: var(--radius-sm);
}

/* === Mid-tier goal card === */
.goal-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; transition: all var(--transition);
}
.goal-card:hover { border-color: var(--border-focus); }
.goal-title { font-size: 0.88rem; font-weight: 600; color: var(--text-main); margin-bottom: 8px; }
.goal-progress-bar {
  height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; margin-bottom: 6px;
}
.goal-progress-fill {
  height: 100%; border-radius: 3px; transition: width 0.4s ease;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
}
.goal-progress-text { font-size: 0.72rem; color: var(--text-sub); }
.goal-subtasks { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.goal-subtask {
  display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-sub);
  cursor: pointer; padding: 2px 0;
}
.goal-subtask.done { color: var(--text-dim); text-decoration: line-through; }

/* === Long-tier vision card === */
.vision-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; transition: all var(--transition);
  border-left: 3px solid var(--accent);
}
.vision-card:hover { border-color: var(--border-focus); border-left-color: var(--accent); }
.vision-title { font-size: 0.92rem; font-weight: 600; color: var(--text-main); margin-bottom: 4px; }
.vision-desc { font-size: 0.78rem; color: var(--text-sub); line-height: 1.5; }
.vision-links { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.vision-link-chip {
  font-size: 0.68rem; padding: 2px 8px; border-radius: 8px;
  background: rgba(124, 106, 239, 0.1); color: var(--accent); border: 1px solid rgba(124, 106, 239, 0.2);
}

/* === Timeblock QL Actual Badge === */
.tb-block-ql-actual {
  font-size: 0.7rem; color: var(--text-main); background: rgba(255,255,255,0.25);
  padding: 1px 5px; border-radius: 4px; margin-top: 2px; display: inline-block;
}


/* === Modal / Dialog === */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: #14141a; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; width: 90%; max-width: 480px; max-height: 85vh; overflow-y: auto;
  transform: scale(0.95); transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 20px; }
.tb-tag-suggestions {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 44px; overflow-y: auto; flex: 1;
}
.tb-tag-suggestions::-webkit-scrollbar { width: 4px; }
.tb-tag-suggestions::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.tb-tag-chip {
  background: var(--bg-body); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 8px; font-size: 0.72rem; color: var(--text-sub);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.tb-tag-chip:hover {
  border-color: var(--accent); color: var(--accent); background: rgba(124, 106, 239, 0.05);
}

.modal-field { margin-bottom: 16px; }
.modal-label {
  display: block; font-size: 0.72rem; color: var(--text-dim); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}
.modal-input {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-main); font-family: var(--font);
  font-size: 0.88rem; padding: 10px 12px; outline: none;
  transition: border-color var(--transition);
}
.modal-input:focus { border-color: var(--accent); }
.modal-input::placeholder { color: var(--text-dim); }
textarea.modal-input { resize: vertical; min-height: 60px; }
.wp-trigger { cursor: pointer; }
.wp-trigger:hover { border-color: var(--accent); }

/* Quadrant selector in modal */
.quadrant-selector {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.q-option {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-input); cursor: pointer; text-align: center;
  font-size: 0.75rem; color: var(--text-sub); transition: all var(--transition);
  display: flex; align-items: center; gap: 6px; justify-content: center;
}
.q-option:hover { border-color: var(--border-focus); }
.q-option.selected { border-color: var(--accent); color: var(--text-main); background: rgba(124,106,239,0.08); }
.q-option-dot { width: 6px; height: 6px; border-radius: 50%; }

/* Tier selector */
.tier-selector { display: flex; gap: 6px; }
.tier-option {
  flex: 1; padding: 8px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-input); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 0.75rem; color: var(--text-sub); transition: all var(--transition);
}
.tier-option:hover { border-color: var(--border-focus); }
.tier-option.selected { border-color: var(--accent); color: var(--text-main); background: rgba(124,106,239,0.08); }

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.modal-btn {
  padding: 9px 20px; border-radius: 8px; font-family: var(--font);
  font-size: 0.85rem; cursor: pointer; transition: all var(--transition); border: none;
}
.modal-btn-cancel { background: none; border: 1px solid var(--border); color: var(--text-sub); }
.modal-btn-cancel:hover { border-color: var(--text-sub); color: var(--text-main); }
.modal-btn-save { background: var(--accent); color: #fff; font-weight: 600; }
.modal-btn-save:hover { background: #6b5ad6; box-shadow: 0 4px 12px var(--accent-glow); }
.modal-btn-del { background: rgba(248,113,113,0.1); color: var(--danger); }
.modal-btn-del:hover { background: rgba(248,113,113,0.2); }
.modal-btn-missed { background: rgba(255,255,255,0.04); color: var(--text-dim); border: 1px solid var(--border); }
.modal-btn-missed:hover { background: rgba(255,255,255,0.08); color: var(--text-sub); }
.modal-btn-missed.active { background: rgba(107,114,128,0.15); color: #9ca3af; border-color: #4b5563; }

/* === Responsive === */
@media (max-width: 640px) {
  .app-container { padding: 20px 14px 50px; }
  .matrix-grid { grid-template-columns: 1fr; }
  .quadrant { min-height: 120px; }
  .app-header { flex-direction: column; gap: 12px; align-items: stretch; }
  .header-actions { justify-content: center; }
}

/* =====================================================
   TIME BLOCKING VIEW
   ===================================================== */

/* Nav bar */
.tb-nav {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.tb-week-label {
  font-size: 0.85rem; font-weight: 600; color: var(--text-main); flex: 1; text-align: center;
}
.tb-nav-btn {
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-sub); font-family: var(--font); font-size: 0.82rem;
  padding: 5px 12px; cursor: pointer; transition: all var(--transition);
}
.tb-nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.tb-nav-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tb-today-btn { font-size: 0.72rem; font-weight: 600; }

/* Segment tabs */
.tb-segment-tabs {
  display: flex; gap: 3px; margin-left: 8px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 10px; padding: 2px;
}
.tb-seg-btn {
  padding: 3px 10px; border-radius: 7px; border: none; background: none;
  color: var(--text-dim); font-family: var(--font); font-size: 0.75rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.tb-seg-btn:hover { color: var(--text-sub); background: rgba(255,255,255,0.04); }
.tb-seg-btn.active { background: var(--accent); color: #fff; }


/* Grid wrapper */
.tb-wrapper {
  display: flex; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card);
}

/* Hour label column */
.tb-hour-col {
  flex-shrink: 0; width: 48px; border-right: 1px solid var(--border);
}
.tb-hour-label {
  display: flex; align-items: flex-start; justify-content: center;
  padding: 2px 0 0 0; font-size: 0.6rem; color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

/* Header cell */
.tb-header-cell {
  height: 48px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; border-bottom: 1px solid var(--border);
  background: var(--bg-card); position: sticky; top: 0; z-index: 10;
}
.tb-day-name { font-size: 0.68rem; color: var(--text-dim); font-weight: 500; }
.tb-day-date {
  font-size: 1.1rem; font-weight: 700; color: var(--text-main); line-height: 1.2;
}
.tb-day-date.today {
  background: var(--accent); color: #fff; border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}

/* Day columns */
.tb-day-col {
  flex: 1; min-width: 100px; border-right: 1px solid var(--border);
}
.tb-day-col:last-child { border-right: none; }
.tb-day-col.today { background: rgba(124, 106, 239, 0.03); }

/* Ideal Day Column */
.tb-ideal-col {
  transition: all var(--transition);
  border-right: 2px solid rgba(124, 106, 239, 0.2);
}
.tb-ideal-col .tb-header-cell {
  cursor: pointer; user-select: none;
  transition: background var(--transition);
}
.tb-ideal-col .tb-header-cell:hover { background: rgba(255, 255, 255, 0.02); }
.tb-ideal-title {
  font-size: 0.95rem; font-weight: 600; color: rgba(255, 255, 255, 0.65);
  transition: all 0.3s; line-height: 1.2; text-align: center;
}
.tb-ideal-col.collapsed {
  flex: 0 0 32px; min-width: 32px; overflow: hidden;
}
.tb-ideal-col.collapsed .tb-block { display: none; }
.tb-ideal-col.collapsed .tb-ideal-title {
  width: 1.2em; word-break: break-all; white-space: normal;
  font-size: 0.85rem; font-weight: 500; color: var(--text-sub);
  margin-top: 4px;
}

/* Day body */
.tb-day-body {
  position: relative; cursor: crosshair;
}
.tb-day-body:hover { background: rgba(255,255,255,0.01); }

/* Hour grid lines */
.tb-hour-line {
  position: absolute; left: 0; right: 0; height: 1px;
  background: var(--border); pointer-events: none;
}

/* Planned block — 实色填充 */
.tb-block {
  position: absolute; left: 2px; right: 2px;
  border-radius: 5px; padding: 4px 7px;
  opacity: 0.88; cursor: pointer; z-index: 2;
  transition: opacity var(--transition), transform var(--transition);
  overflow: hidden;
}
.tb-block:hover { opacity: 1; transform: scaleX(1.02); z-index: 5; }
.tb-block.missed {
  opacity: 0.35 !important; filter: grayscale(1);
}
.tb-block.tb-ql-linked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.06) 6px,
    transparent 6px,
    transparent 12px
  );
  pointer-events: none;
}
.tb-block-label {
  font-size: 0.72rem; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2;
}
.tb-block-time { 
  font-size: 0.62rem; color: rgba(255,255,255,0.9); 
  margin-top: 3px; line-height: 1.1; font-weight: 500;
}

/* Compact block (short duration) */
.tb-block-compact { padding: 2px 7px; display: flex; align-items: center; }
.tb-block-compact .tb-block-label {
  flex: 1; min-width: 0; /* 允许 truncate */
}
.tb-block-time-inline {
  font-size: 0.6rem; color: rgba(255,255,255,0.6); margin-left: 6px; font-weight: 400;
  flex-shrink: 0; white-space: nowrap;
}


/* ===== Wheel Picker ===== */
.wp-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 700;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
  backdrop-filter: blur(4px);
}
.wp-overlay.open { opacity: 1; pointer-events: all; }
.wp-panel {
  background: #14141a; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; width: 280px;
  transform: scale(0.95); transition: transform 0.2s;
}
.wp-overlay.open .wp-panel { transform: scale(1); }
.wp-title {
  text-align: center; font-size: 0.85rem; font-weight: 600; color: var(--text-main);
  margin-bottom: 16px;
}
.wp-body {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  position: relative;
}
.wp-col {
  width: 72px; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  height: 220px; /* VISIBLE(5) × ITEM_H(44) */
}
.wp-col::-webkit-scrollbar { display: none; }
.wp-item {
  height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 400; color: var(--text-dim);
  cursor: grab; user-select: none;
  transition: opacity 0.1s, font-size 0.1s, color 0.1s;
}
.wp-item:active { cursor: grabbing; }
.wp-pad { pointer-events: none; opacity: 0; }
.wp-sep {
  font-size: 1.3rem; font-weight: 700; color: var(--text-sub); padding: 0 2px;
}
.wp-highlight {
  position: absolute; left: 8px; right: 8px;
  top: 50%; transform: translateY(-50%);
  height: 44px; border-radius: 8px;
  background: rgba(124, 106, 239, 0.1); border: 1px solid rgba(124, 106, 239, 0.25);
  pointer-events: none;
}
.wp-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px;
}
.wp-btn {
  padding: 8px 20px; border-radius: 8px; font-family: var(--font);
  font-size: 0.82rem; cursor: pointer; transition: all var(--transition); border: none;
}
.wp-cancel { background: none; border: 1px solid var(--border); color: var(--text-sub); }
.wp-cancel:hover { border-color: var(--text-sub); color: var(--text-main); }
.wp-confirm { background: var(--accent); color: #fff; font-weight: 600; }
.wp-confirm:hover { background: #6b5ad6; }

/* Block Modal */
.tb-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 600;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
  backdrop-filter: blur(4px);
}
.tb-modal-overlay.open { opacity: 1; pointer-events: all; }
.tb-modal {
  background: #14141a; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; width: 90%; max-width: 380px;
  transform: scale(0.96); transition: transform 0.2s;
}
.tb-modal-overlay.open .tb-modal { transform: scale(1); }

.tb-color-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px;
}
.tb-color-swatch {
  width: 24px; height: 24px; border-radius: 6px; cursor: pointer;
  transition: transform 0.15s; border: 2px solid transparent;
}
.tb-color-swatch:hover { transform: scale(1.15); }
.tb-color-swatch.selected { border-color: #fff; transform: scale(1.1); }

@media (max-width: 640px) {
  .tb-day-col { min-width: 80px; }
}

/* === Custom Select Dropdown === */
.custom-select {
  position: relative; user-select: none;
}
.custom-select-trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-main); font-family: var(--font);
  font-size: 0.88rem; padding: 10px 12px; cursor: pointer;
  transition: border-color var(--transition);
}
.custom-select-trigger::after {
  content: '›'; transform: rotate(90deg); display: inline-block;
  color: var(--text-dim); font-size: 1rem; transition: transform var(--transition);
  flex-shrink: 0; margin-left: 8px;
}
.custom-select.open .custom-select-trigger {
  border-color: var(--accent);
}
.custom-select.open .custom-select-trigger::after {
  transform: rotate(-90deg);
}
.custom-select-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 200;
  background: #1a1a22; border: 1px solid var(--border-focus);
  border-radius: 10px; overflow: hidden; max-height: 220px; overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}
.custom-select.open .custom-select-dropdown {
  opacity: 1; transform: translateY(0); pointer-events: all;
}
.custom-select-option {
  padding: 10px 14px; font-size: 0.85rem; color: var(--text-sub);
  cursor: pointer; transition: background var(--transition), color var(--transition);
}
.custom-select-option:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
.custom-select-option.selected { color: var(--accent); background: rgba(124,106,239,0.08); }
.custom-select-option.placeholder { color: var(--text-dim); font-style: italic; }
@keyframes shake-error { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } } .shake-anim { animation: shake-error 0.3s ease-in-out; display: inline-block; }
