/* Moart 고객 대시보드 [팀 워크스페이스] 전용 스타일 (관리자 개별 오픈 · 팀원 전용 노출) */

.dtw-wrap { display: grid; gap: 16px; }
.dtw-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 18px 22px; border-radius: 16px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 55%, #4338ca 100%);
  color: #ffffff; box-shadow: 0 12px 28px rgba(49, 46, 129, 0.24);
}
.dtw-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 900; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dtw-head p { margin: 0; font-size: 13px; color: #c7d2fe; }
.dtw-head__right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dtw-pill {
  font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); color: #ffffff;
}
.dtw-pill--ok { background: #ecfdf5; color: #047857; }
.dtw-pill--warn { background: #fffbeb; color: #b45309; }
.dtw-pill--indigo { background: #eef2ff; color: #4338ca; }
.dtw-pill--slate { background: #f1f5f9; color: #475569; }
.dtw-pill--rose { background: #fef2f2; color: #dc2626; }

.dtw-select {
  height: 36px; padding: 0 11px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 23, 42, 0.35); color: #ffffff; font: inherit; font-size: 13px; font-weight: 700;
}
.dtw-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dtw-kpi {
  background: var(--bg-surface, #ffffff); border: 1px solid var(--border-default, #e2e8f0);
  border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px;
}
.dtw-kpi span { font-size: 11.5px; font-weight: 700; color: var(--text-secondary, #64748b); }
.dtw-kpi strong { font-size: 20px; font-weight: 900; color: var(--text-primary, #0f172a); }
.dtw-kpi small { font-size: 11.5px; color: var(--text-secondary, #64748b); }

.dtw-tabs { display: inline-flex; gap: 6px; padding: 4px; border-radius: 12px; background: var(--bg-subtle, #e2e8f0); width: fit-content; }
.dtw-tab {
  border: none; background: transparent; color: var(--text-secondary, #475569);
  font: inherit; font-size: 13px; font-weight: 800; padding: 8px 16px; border-radius: 9px; cursor: pointer;
}
.dtw-tab.is-active { background: #0f172a; color: #ffffff; }

.dtw-card {
  background: var(--bg-surface, #ffffff); border: 1px solid var(--border-default, #e2e8f0);
  border-radius: 16px; padding: 18px; display: grid; gap: 14px;
}
.dtw-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dtw-card__head h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--text-primary, #0f172a); }

.dtw-btn {
  height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border-default, #cbd5e1);
  background: var(--bg-surface, #ffffff); color: var(--text-primary, #0f172a);
  font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; text-decoration: none;
}
.dtw-btn--sm { height: 30px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.dtw-btn--primary { background: #4f46e5; border-color: #4f46e5; color: #ffffff; }
.dtw-btn--primary:hover { background: #4338ca; }
.dtw-btn--emerald { background: linear-gradient(135deg, #059669, #10b981); border-color: transparent; color: #ffffff; }
.dtw-btn--danger { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

.dtw-proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.dtw-proj-card {
  border: 1px solid var(--border-default, #e2e8f0); border-radius: 14px; overflow: hidden;
  background: var(--bg-surface, #ffffff); display: flex; flex-direction: column;
}
.dtw-proj-thumb {
  height: 150px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.dtw-proj-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.dtw-proj-body { padding: 12px; display: grid; gap: 6px; }
.dtw-proj-title { font-size: 13.5px; font-weight: 800; color: var(--text-primary, #0f172a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtw-proj-meta { font-size: 11.5px; color: var(--text-secondary, #64748b); }
.dtw-proj-ops { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

.dtw-members-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr); gap: 16px; align-items: start; }
.dtw-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dtw-table th, .dtw-table td { padding: 10px 8px; border-bottom: 1px solid var(--border-default, #e2e8f0); text-align: left; }
.dtw-table th { font-size: 11.5px; color: var(--text-secondary, #64748b); font-weight: 700; }

.dtw-input {
  height: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--border-default, #cbd5e1);
  background: var(--bg-subtle, #f8fafc); color: var(--text-primary, #0f172a); font: inherit; font-size: 13px; width: 100%;
}
.dtw-form { display: grid; gap: 10px; }
.dtw-form label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; color: var(--text-secondary, #334155); }
.dtw-empty { text-align: center; padding: 32px 16px; color: var(--text-secondary, #64748b); font-size: 13px; border: 1px dashed var(--border-default, #cbd5e1); border-radius: 12px; }

.dtw-modal-backdrop {
  position: fixed; inset: 0; z-index: 11000; background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px;
}
.dtw-modal-backdrop[hidden] { display: none !important; }
.dtw-modal {
  width: min(500px, 100%); max-height: 85vh; overflow-y: auto; border-radius: 18px;
  background: #ffffff; color: #0f172a; padding: 22px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  display: grid; gap: 14px;
}
.dtw-modal h3 { margin: 0; font-size: 17px; font-weight: 900; }
.dtw-modal p { margin: 0; font-size: 13px; line-height: 1.6; color: #475569; }
.dtw-pick-list { display: grid; gap: 8px; max-height: 45vh; overflow-y: auto; }
.dtw-pick-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 10px; border: 1px solid #e2e8f0; background: #f8fafc;
}
.dtw-pick-row strong { font-size: 13px; color: #0f172a; }

@media (max-width: 1020px) {
  .dtw-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dtw-members-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .dtw-kpis { grid-template-columns: 1fr; }
}
