/* manhour.css —— 每日工时填写浮窗样式（独立于甘特图主样式，复用项目设计语言） */

.manhour-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #2a3242;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
  overflow: hidden;
}
.manhour-dialog::backdrop { background: rgba(15, 23, 42, .35); }
.manhour-dialog[open] { display: block; }

/* 顶部任务条 */
.mh-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid #eef0f4;
  background: #f7f9fc;
}
.mh-task { flex: 1; min-width: 0; font-size: 14px; color: #1a1f2e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mh-task b { color: #2f6bff; }
.mh-start { margin-left: 8px; font-size: 12px; color: #8a93a6; font-weight: 400; }
.mh-range {
  margin-left: 8px; font-size: 12px; color: #6b7686; font-weight: 400;
  background: #eef2f9; border: 1px solid #e2e8f2; border-radius: 6px; padding: 2px 8px;
}
.mh-x {
  width: 28px; height: 28px; flex: none; border: 0; border-radius: 8px;
  background: transparent; color: #9aa3b2; font-size: 20px; line-height: 1; cursor: pointer;
}
.mh-x:hover { background: #eceff4; color: #3d4658; }

/* 翻日栏 */
.mh-datebar {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 12px 16px; border-bottom: 1px solid #f0f2f6;
}
.mh-arrow {
  width: 34px; height: 34px; border: 1px solid #e2e6ee; border-radius: 9px;
  background: #fff; color: #4a5266; font-size: 20px; line-height: 1; cursor: pointer;
}
.mh-arrow:hover { background: #f3f6fb; border-color: #c7d0e0; color: #2f6bff; }
.mh-date { font-size: 15px; font-weight: 600; color: #1a1f2e; min-width: 230px; text-align: center; }
/* 日期文字叠加一个透明 .date-input 输入框，点击即触发全局日历弹层 */
.mh-date-wrap { position: relative; display: inline-flex; align-items: center; min-width: 230px; justify-content: center; border-radius: 8px; cursor: pointer; }
.mh-date-wrap:hover { background: #f1f5fd; }
.mh-date-label { font-size: 15px; font-weight: 600; color: #1a1f2e; pointer-events: none; user-select: none; }
.mh-date.date-input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  border: 0; background: transparent; cursor: pointer; opacity: 0;
}

/* 表格 */
.mh-table { padding: 8px 16px 4px; overflow: auto; }
.mh-thead, .mh-row, .mh-tfoot {
  display: grid;
  grid-template-columns: 40px 1fr 96px 140px 1fr 36px;
  align-items: center; gap: 8px;
}
.mh-thead {
  position: sticky; top: 0; z-index: 1;
  padding: 8px 4px; font-size: 12px; font-weight: 600; color: #6a7388;
  background: #fff; border-bottom: 1px solid #eceff4;
}
.mh-tbody { min-height: 40px; }
.mh-row { padding: 6px 4px; border-bottom: 1px solid #f4f6f9; }
.mh-c-seq { text-align: center; color: #9aa3b2; font-size: 13px; }
.mh-input {
  width: 100%; height: 34px; padding: 0 10px; font: inherit; font-size: 13px; color: #2a3242;
  border: 1px solid #e2e6ee; border-radius: 8px; background: #fff; outline: none;
}
.mh-input:focus { border-color: #2f6bff; box-shadow: 0 0 0 3px rgba(47, 107, 255, .12); }
.mh-hours { text-align: right; }
.mh-input:disabled { background: #f5f7fa; color: #8a93a6; cursor: not-allowed; }
.mh-c-op { display: flex; justify-content: center; }
.mh-c-res { min-width: 0; }
.mh-res { width: 100%; height: 34px; padding: 0 8px; font: inherit; font-size: 13px; color: #2a3242; border: 1px solid #e2e6ee; border-radius: 8px; background: #fff; outline: none; }
.mh-res:focus { border-color: #2f6bff; box-shadow: 0 0 0 3px rgba(47, 107, 255, .12); }
.mh-res:disabled { background: #f5f7fa; color: #8a93a6; cursor: not-allowed; }
.mh-del {
  width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent;
  color: #b9c0cd; font-size: 17px; line-height: 1; cursor: pointer;
}
.mh-del:hover { background: #fdeeee; color: #e5484d; }
.mh-empty { padding: 22px 4px; text-align: center; color: #9aa3b2; font-size: 13px; }
.mh-tfoot {
  padding: 10px 4px; margin-top: 4px; border-top: 2px solid #eef0f4;
  font-size: 13px; font-weight: 600; color: #3d4658;
}
.mh-total-label { color: #6a7388; font-weight: 600; }
.mh-tfoot .mh-c-hours { color: #2f6bff; font-size: 15px; }

/* 底部操作 */
.mh-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 16px 16px; }
.mh-add {
  height: 36px; padding: 0 16px; border: 1px dashed #c2ccdd; border-radius: 9px;
  background: #fff; color: #4a5266; font: inherit; font-size: 13px; cursor: pointer;
}
.mh-add:hover { border-color: #2f6bff; color: #2f6bff; background: #f5f8ff; }
.mh-save { height: 36px; padding: 0 22px; border: 0; border-radius: 9px; background: #2f6bff; color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.mh-save:hover { background: #2459e0; }

/* 深色主题适配 */
html.theme-dark .manhour-dialog { background: #161d2c; color: #d7dcea; box-shadow: 0 24px 64px rgba(0, 0, 0, .5); }
html.theme-dark .manhour-dialog::backdrop { background: rgba(0, 0, 0, .5); }
html.theme-dark .mh-head { background: #1b2434; border-bottom-color: #283248; }
html.theme-dark .mh-task { color: #e7ecf5; }
html.theme-dark .mh-task b { color: #7aa0ff; }
html.theme-dark .mh-start { color: #8290a8; }
html.theme-dark .mh-range { color: #9aa6bd; background: #1c2434; border-color: #2a3650; }
html.theme-dark .mh-x:hover { background: #232c40; color: #e7ecf5; }
html.theme-dark .mh-datebar { border-bottom-color: #232c40; }
html.theme-dark .mh-arrow { background: #1b2434; border-color: #2c3950; color: #aeb8cc; }
html.theme-dark .mh-arrow:hover { background: #223052; border-color: #3a4d70; color: #7aa0ff; }
html.theme-dark .mh-date { color: #e7ecf5; }
html.theme-dark .mh-date-label { color: #e7ecf5; }
html.theme-dark .mh-date-wrap:hover { background: #1c2840; }
html.theme-dark .mh-thead { background: #161d2c; color: #93a0b8; border-bottom-color: #283248; }
html.theme-dark .mh-row { border-bottom-color: #202838; }
html.theme-dark .mh-input { background: #111829; border-color: #2c3950; color: #d7dcea; }
html.theme-dark .mh-input:focus { border-color: #5a7dff; box-shadow: 0 0 0 3px rgba(90, 125, 255, .18); }
html.theme-dark .mh-input:disabled { background: #131b29; color: #6a768c; }
html.theme-dark .mh-res { background: #111829; border-color: #2c3950; color: #d7dcea; }
html.theme-dark .mh-res:focus { border-color: #5a7dff; box-shadow: 0 0 0 3px rgba(90, 125, 255, .18); }
html.theme-dark .mh-res:disabled { background: #131b29; color: #6a768c; }
html.theme-dark .mh-tfoot { border-top-color: #283248; }
html.theme-dark .mh-tfoot .mh-c-hours { color: #7aa0ff; }
html.theme-dark .mh-add { background: #1b2434; border-color: #2c3950; color: #aeb8cc; }
html.theme-dark .mh-add:hover { border-color: #5a7dff; color: #7aa0ff; background: #1d2740; }
html.theme-dark .mh-save { background: #2f6bff; }
html.theme-dark .mh-save:hover { background: #2459e0; }
