/* ── 공통 업무 폼 (모달 · 업무관리) ── */

.task-form-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.task-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.task-form-label {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.task-form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.task-form-progress-val {
  margin-left: 6px;
  font-weight: 800;
  color: #1e293b;
}

.task-form-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  outline: none;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.task-form-input:focus {
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.12);
}

.task-form-input--title {
  font-size: 17px;
  font-weight: 600;
}

.task-form-textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.45;
}

.task-form-textarea--tall {
  min-height: 96px;
}

.task-form-range {
  width: 100%;
  accent-color: #29724f;
}

.task-form-people {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #d4ebe3;
  background: rgba(232, 245, 240, 0.45);
}

.task-form-assignees {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-form-assignee-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #dbe3ea;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.task-form-assignee-chip.is-checked {
  background: #29724f;
  border-color: #29724f;
  color: #fff;
}

.task-form-empty {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px dashed #dbe3ea;
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
}

.task-form-issues {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-form-issue {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.task-form-issue-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.task-form-issue-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.task-form-issue-date-label {
  flex-shrink: 0;
}

.task-form-issue-date-input {
  width: auto;
  min-width: 0;
  padding: 4px 8px;
  font-size: 12px;
}

.task-form-issue-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}

.task-form-link-btn {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: #2563ab;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.task-form-link-btn:hover {
  background: rgba(74, 144, 217, 0.1);
}

.task-form-link-btn--danger {
  color: #dc2626;
}

.task-form-link-btn--danger:hover {
  background: rgba(220, 38, 38, 0.08);
}

.task-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
}

.task-form-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.task-form-btn--ghost {
  background: #fff;
  border: 1px solid #dbe3ea;
  color: #64748b;
}

.task-form-btn--ghost:hover {
  background: #f8fafc;
}

.task-form-btn--primary {
  background: #29724f;
  color: #fff;
}

.task-form-btn--primary:hover {
  background: #1f5a3d;
}

.task-form-btn--primary.is-routine {
  background: #0d4a38;
}

.task-form-btn--danger {
  background: #fff;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.task-form-btn--danger:hover {
  background: #fef2f2;
}

/* ── TaskModal ── */

.task-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 33, 24, 0.55);
  backdrop-filter: blur(2px);
}

.task-modal-shell {
  width: min(540px, 94vw);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(7, 33, 24, 0.28);
}

.task-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(120deg, #0d4a38 0%, #29724f 100%);
  color: #fff;
}

.task-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.task-modal-close {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.task-modal-close:hover {
  color: #fff;
}

.task-modal-body {
  overflow-y: auto;
  padding: 18px 20px 20px;
}

/* ── 업무관리 ── */

.task-manager-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  background: rgba(7, 33, 24, 0.58);
  backdrop-filter: blur(3px);
}

.task-manager-shell {
  display: flex;
  flex-direction: column;
  width: min(1180px, 100%);
  height: min(calc(100dvh - 40px), 920px);
  max-height: calc(100dvh - 40px);
  min-height: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #f4f7f5;
  box-shadow: 0 28px 80px rgba(7, 33, 24, 0.32);
}

.task-manager-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  background: linear-gradient(120deg, #0d4a38 0%, #29724f 55%, #37a184 100%);
  color: #fff;
}

.task-manager-header__title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.task-manager-header__quarter {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.82;
}

.task-manager-close {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
}

.task-manager-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.task-manager-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid #dbe3ea;
  background: #fff;
}

.task-manager-tabs {
  display: flex;
  gap: 6px;
}

.task-manager-tab {
  border: 1px solid #dbe3ea;
  background: #f8fafc;
  color: #64748b;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.task-manager-tab.is-active {
  background: #29724f;
  border-color: #29724f;
  color: #fff;
}

.task-manager-tab.is-active.is-routine {
  background: #0d4a38;
  border-color: #0d4a38;
}

.task-manager-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.task-manager-chip {
  border: 1px solid #dbe3ea;
  background: #fff;
  color: #64748b;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.task-manager-chip.is-active {
  background: rgba(41, 114, 79, 0.12);
  border-color: #29724f;
  color: #1f5a3d;
}

.task-manager-toolbar__spacer {
  flex: 1 1 auto;
}

.task-manager-search {
  min-width: 180px;
  max-width: 260px;
  flex: 1 1 180px;
  border: 1px solid #dbe3ea;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  outline: none;
}

.task-manager-search:focus {
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.12);
}

.task-manager-add {
  border: none;
  background: #29724f;
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.task-manager-add:hover {
  background: #1f5a3d;
}

.task-manager-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.task-manager-empty {
  margin: auto;
  padding: 48px 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 16px;
  flex-shrink: 0;
}

.task-manager-row {
  flex-shrink: 0;
  flex-grow: 0;
  border-radius: 12px;
  border: 1px solid #dbe3ea;
  background: #fff;
  overflow: visible;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.task-manager-row.is-expanded {
  border-color: #7eb3e8;
  box-shadow: 0 4px 16px rgba(41, 114, 79, 0.08);
  overflow: visible;
}

.task-manager-row--hrm {
  box-shadow: inset 4px 0 0 #29724f;
}

.task-manager-row--hrd {
  box-shadow: inset 4px 0 0 #37a184;
}

.task-manager-row--ex {
  box-shadow: inset 4px 0 0 #4a9480;
}

.task-manager-row--ga {
  box-shadow: inset 4px 0 0 #0d4a38;
}

.task-manager-row--routine {
  box-shadow: inset 4px 0 0 #5b2d8a;
}

.task-manager-row__summary {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 12px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.task-manager-row__summary:hover {
  background: rgba(41, 114, 79, 0.04);
}

.task-manager-row__chevron {
  flex-shrink: 0;
  width: 18px;
  color: #94a3b8;
  transition: transform 0.15s ease;
}

.task-manager-row.is-expanded .task-manager-row__chevron {
  transform: rotate(90deg);
}

.task-manager-row__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-manager-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 1 1 180px;
  min-width: 0;
}

.task-manager-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.task-manager-badge--section {
  background: rgba(41, 114, 79, 0.1);
  color: #1f5a3d;
}

.task-manager-badge--category {
  background: rgba(91, 45, 138, 0.1);
  color: #5b2d8a;
}

.task-manager-badge--progress {
  background: rgba(74, 144, 217, 0.12);
  color: #2563ab;
  font-size: 13px;
}

.task-manager-badge--status {
  background: #f1f5f9;
  color: #64748b;
}

.task-manager-badge--status.is-done {
  background: rgba(41, 114, 79, 0.12);
  color: #1f5a3d;
}

.task-manager-badge--status.is-active {
  background: rgba(74, 144, 217, 0.12);
  color: #2563ab;
}

.task-manager-panel {
  padding: 12px 16px 16px;
  border-top: 1px solid #eef2f6;
  animation: task-manager-panel-in 0.2s ease;
}

.task-manager-row.is-expanded .task-manager-panel {
  max-height: min(78vh, 860px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.task-manager-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed #dbe3ea;
}

.task-manager-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.task-manager-section__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #1f5a3d;
}

.task-manager-subrow {
  margin-bottom: 6px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fafbfc;
  overflow: hidden;
}

.task-manager-subrow.is-expanded {
  border-color: #b8d4c8;
  background: #fff;
}

.task-manager-subrow__head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.task-manager-subrow__head:hover {
  background: rgba(41, 114, 79, 0.04);
}

.task-manager-subrow__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

.task-manager-subrow__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.task-manager-subpanel {
  padding: 0 12px 12px;
  border-top: 1px solid #eef2f6;
}

.task-manager-subpanel--new {
  padding: 12px;
  margin-bottom: 8px;
  border: 1px dashed #b8d4c8;
  border-radius: 10px;
  background: #f8fbf9;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes task-manager-panel-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.task-manager-panel__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eef2f6;
}

.task-manager-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid #dbe3ea;
  background: #fff;
  font-size: 12px;
  color: #64748b;
}

.task-manager-badge--status.is-legacy {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.task-manager-footer strong {
  color: #1e293b;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
