/* ═══════════════════════════════════════════════════
   MYTASKS.CSS  —  업무 페이지 (Projects 스타일 통일)
═══════════════════════════════════════════════════ */

*,
*::before,
*::after { box-sizing: border-box; }

/* ── 래퍼 ── */
.mytasks-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ── 헤더 카드 (proj-list-header 패턴) ── */
.mytasks-header {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.mytasks-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mytasks-title {
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  margin: 0;
}
.mytasks-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

/* 상태 필터 탭 (proj 탭 스타일) */
.mytasks-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

.mytasks-status-filters { display: flex; gap: 2px; flex-wrap: wrap; }

.mt-sf-btn {
  padding: 7px 14px;
  border-radius: 99px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.2px;
}
.mt-sf-btn:hover {
  background: var(--bg);
  color: var(--text);
}
.mt-sf-btn.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* 검색 (proj-search 패턴) */
.mytasks-search-wrap {
  position: relative;
  margin-left: auto;
}
.mytasks-search-wrap > svg,
.mytasks-search-icon {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--muted); pointer-events: none;
}
.mytasks-search {
  padding: 9px 12px 9px 30px;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-family: inherit; font-size: 13px; color: var(--text);
  background: var(--bg); outline: none; transition: border-color 0.2s;
  width: 240px;
}
.mytasks-search:focus {
  border-color: var(--primary);
  border-width: 2px;
  background: var(--bg-secondary);
}
.mytasks-search::placeholder { color: var(--muted); }

/* ── 리스트 카드 ── */
.mytasks-body {
  background: var(--bg-secondary);
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

/* 리스트 헤더 */
.mytasks-list-header {
  display: grid;
  grid-template-columns: 24px 150px 1fr 85px 90px 100px 155px;
  gap: 0;
  padding: 9px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.mytasks-list { display: flex; flex-direction: column; }

/* ── 업무 행 ── */
.mt-row {
  display: grid;
  grid-template-columns: 24px 150px 1fr 85px 90px 100px 155px;
  gap: 0;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.12s;
  cursor: grab;
  background: var(--bg-secondary);
}
.mt-row:last-child { border-bottom: none; }
.mt-row:hover { background: var(--bg-hover); }
.mt-row.mt-row-dragging { opacity: 0.5; cursor: grabbing; }
.mt-row.mt-row-over {
  border-top: 2px solid var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, var(--bg-secondary));
}

/* 열 */
.mt-col-drag { color: var(--muted); display: flex; align-items: center; cursor: grab; }
.mt-col-project { display: flex; align-items: center; padding-right: 8px; }
.mt-col-task { display: flex; align-items: center; gap: 6px; min-width: 0; padding-right: 8px; }
.mt-col-status { display: flex; align-items: center; }
.mt-col-pay { display: flex; align-items: center; }
.mt-col-assignee { font-size: 12px; color: var(--text-secondary); }
.mt-col-date { font-size: 12px; color: var(--text-secondary); }

/* 프로젝트 배지 */
.mt-proj-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

/* 업무 제목 */
.mt-task-title {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 결제 타입 dot */
.mt-pay-type-dot {
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  background: rgba(251,188,4,.12);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}

/* 상태 배지 (proj-card-status 패턴) */
.mt-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.mt-status-진행중  { background: #e6f4ea; color: #137333; }
.mt-status-완료    { background: #f1f3f4; color: #5f6368; }
.mt-status-대기    { background: #e8f0fe; color: #1967d2; }
.mt-status-보류    { background: #fce8e6; color: #b31412; }

/* 결제 배지 */
.mt-pay-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.mt-pay-none { font-size: 12px; color: var(--muted); }

/* 종일 배지 */
.mt-allday-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
}

/* ── 빈 상태 ── */
.mytasks-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
}
.mytasks-empty svg { opacity: 0.3; }
.mytasks-empty p { font-size: 14px; margin: 0; color: var(--text-secondary); }

/* ── 반응형 ── */
@media (max-width: 1024px) {
  .mytasks-list-header,
  .mt-row { grid-template-columns: 24px 130px 1fr 75px 90px 145px; }
  .mt-col-assignee, .mytasks-col-assignee { display: none; }
}
@media (max-width: 768px) {
  .mytasks-list-header,
  .mt-row { grid-template-columns: 24px 1fr 75px 90px; }
  .mt-col-project, .mytasks-col-project { display: none; }
  .mt-col-date, .mytasks-col-date { display: none; }
}
@media (max-width: 640px) {
  .mytasks-search { width: 160px; }
  .mytasks-list-header,
  .mt-row { grid-template-columns: 24px 1fr 80px; }
  .mt-col-pay, .mytasks-col-pay { display: none; }
}
