:root {
  --bg: #f4f8ff;
  --surface: #ffffff;
  --text: #101828;
  --muted: #64748b;
  --line: #dbe6f4;
  --primary: #2367f4;
  --primary-dark: #174ec5;
  --primary-soft: #eaf2ff;
  --ink-soft: #243045;
  --green: #16805f;
  --amber: #a15c00;
  --red: #c03434;
  --shadow: 0 18px 45px rgba(31, 71, 132, 0.11);
  --shadow-soft: 0 10px 24px rgba(31, 71, 132, 0.07);
}

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

html {
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  margin: 0;
  background:
    linear-gradient(142deg, rgba(35, 103, 244, 0.1) 0 18%, transparent 18% 100%),
    linear-gradient(24deg, transparent 0 72%, rgba(23, 78, 197, 0.07) 72% 100%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 360px, var(--bg) 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Pretendard, Apple SD Gothic Neo, Noto Sans KR, sans-serif;
  line-height: 1.55;
  word-break: keep-all;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg,
canvas,
video,
iframe {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(219, 230, 244, 0.9);
  box-shadow: 0 10px 28px rgba(31, 71, 132, 0.06);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #2367f4, #174ec5);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 12px 26px rgba(35, 103, 244, 0.26);
}

.brand-text {
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

.brand-text small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  word-break: keep-all;
  min-width: 0;
}

.nav-actions a {
  padding: 8px 11px;
  border-radius: 8px;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.nav-actions a:hover,
.nav-actions a.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
  min-width: 0;
}

.ad-shell {
  width: min(980px, calc(100% - 32px));
  margin: 16px auto 0;
  min-width: 0;
}

.ad-shell + .page {
  padding-top: 24px;
}

.page + .ad-shell {
  margin-top: -44px;
  margin-bottom: 44px;
}

.ad-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(213, 220, 232, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.ad-card > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.app-ad-unit {
  display: block;
  width: 100%;
  min-height: 72px;
}

.ad-shell:has(.adsbygoogle[data-ad-status="unfilled"]),
.ad-shell:has(.adsbygoogle[data-ad-status="unfill-optimized"]) {
  display: none;
}

.page > .page-head {
  padding: 20px 22px;
  border: 1px solid rgba(219, 230, 244, 0.95);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 255, 0.88)),
    #fff;
  box-shadow: var(--shadow-soft);
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.18;
  letter-spacing: 0;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.page-subtitle {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  text-wrap: pretty;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.card,
.form-card {
  background: linear-gradient(180deg, var(--surface), #fbfcff);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel,
.form-card {
  padding: 22px;
}

.card {
  padding: 18px;
}

.team-card {
  transition: background-color 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
}

.team-card.is-closed {
  border-color: #a7adbb;
  background: #d8dce4;
  color: #384152;
  box-shadow: none;
}

.team-card.is-closed h2,
.team-card.is-closed strong {
  color: #222a36;
}

.team-card.is-closed .muted,
.team-card.is-closed .metric span {
  color: #5f6878;
}

.team-card.is-closed .metric {
  border-color: #b8bfcc;
  background: #cfd4dd;
}

.team-card.is-closed .button {
  background: #333b49;
  border-color: #333b49;
  color: #fff;
}

.team-card.is-closed .button.secondary {
  background: #e6e9ee;
  border-color: #a7adbb;
  color: #333b49;
}

.card h2,
.card h3,
.panel h2,
.panel h3,
.form-card h2,
.form-card h3 {
  margin: 0 0 8px;
  letter-spacing: 0;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.muted {
  color: var(--muted);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.small {
  font-size: 13px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-card-head {
  margin-bottom: 18px;
}

.form-card-head p {
  margin: 0;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cfd6e3;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.dialog-input:focus {
  outline: 0;
  border-color: rgba(49, 87, 213, 0.72);
  box-shadow: 0 0 0 3px rgba(49, 87, 213, 0.12);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field-wide {
  grid-column: 1 / -1;
}

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

.create-room-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.78fr);
  gap: 18px;
  align-items: stretch;
}

.create-room-card {
  padding: 28px;
}

.create-room-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.create-room-aside {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 100%;
  padding: 24px;
  border: 1px solid #c7d7fe;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #f7f9ff, #fff),
    #fff;
  box-shadow: var(--shadow);
}

.create-preview-head {
  display: grid;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.create-preview-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.create-preview-head p {
  margin: 0;
  color: var(--muted);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.create-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.create-preview-grid > div,
.create-preview-block {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.create-preview-grid span,
.create-preview-block span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.create-preview-grid strong {
  min-height: 24px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.create-preview-block p {
  min-height: 74px;
  margin: 0;
  color: #475467;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.create-flow {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.create-flow > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  background: #f8fafc;
}

.create-flow strong {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #101828;
  color: #fff;
  font-size: 14px;
}

.create-flow span {
  color: #344054;
  font-weight: 850;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
  box-shadow: 0 8px 18px rgba(49, 87, 213, 0.16);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(49, 87, 213, 0.2);
}

.button.compact {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.button.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.button.secondary:hover {
  background: #f7f9fc;
  color: var(--primary-dark);
}

.button.danger {
  background: #fff;
  border-color: #f2b5b5;
  color: var(--red);
  box-shadow: none;
}

.button.danger:hover {
  background: #fff5f5;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.message {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 750;
  box-shadow: var(--shadow-soft);
}

.message.show {
  display: block;
}

.message.error {
  background: #fff1f1;
  color: var(--red);
  border: 1px solid #ffd2d2;
}

.message.success {
  background: #ecfdf5;
  color: var(--green);
  border: 1px solid #b8f0d2;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.46);
}

.dialog-box {
  width: min(420px, 100%);
  max-width: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
}

.dialog-box h2 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: 0;
}

.dialog-box p {
  margin: 0;
  color: var(--muted);
}

.dialog-input {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #cfd6e3;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.notice {
  padding: 14px 16px;
  border: 1px solid #c7d7fe;
  border-radius: 8px;
  background: #eef4ff;
  color: #2445ad;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.metric {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfcff);
  box-shadow: var(--shadow-soft);
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric strong {
  font-size: 28px;
  line-height: 1;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.table th {
  color: #475467;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 900;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tabs a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #475467;
  font-weight: 800;
  font-size: 14px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.tabs a.active {
  border-color: var(--primary);
  background: #eef4ff;
  color: var(--primary-dark);
  box-shadow: 0 8px 18px rgba(49, 87, 213, 0.12);
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status.todo {
  background: #f2f4f7;
  color: #475467;
}

.status.progress {
  background: #fffbeb;
  color: #92400e;
}

.status.done {
  background: #ecfdf5;
  color: var(--green);
}

.status.late_done {
  background: #fef3c7;
  color: #8a4b00;
}

.status.late,
.status.missing,
.status.missing_late {
  background: #fff1f1;
  color: var(--red);
}

.task-list,
.log-list {
  display: grid;
  gap: 12px;
}

.task-card,
.log-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfcff);
  padding: 16px;
  word-break: keep-all;
  overflow-wrap: break-word;
  box-shadow: var(--shadow-soft);
}

.task-card.is-mine {
  border-color: rgba(49, 87, 213, 0.5);
  box-shadow: 0 12px 30px rgba(49, 87, 213, 0.12);
}

.my-task-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.task-card h3 {
  margin: 0 0 4px;
}

.evidence-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.evidence-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fbfcfe;
  font-size: 13px;
  font-weight: 750;
}

.evidence-item.deleted {
  color: var(--muted);
  background: #f8fafc;
}

.evidence-item.deleted strong {
  color: var(--red);
  font-size: 12px;
}

.member-task-summary {
  margin-bottom: 16px;
}

.member-task-panel {
  display: grid;
  gap: 16px;
}

.member-task-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.member-task-panel-head h2 {
  margin-bottom: 6px;
}

.member-task-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.member-task-tools {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.mindmap-controls {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.mindmap-controls[hidden],
.mindmap-controls [hidden] {
  display: none !important;
}

.member-task-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #d0d5dd;
}

.legend-dot.todo {
  background: #98a2b3;
}

.legend-dot.progress {
  background: #f59e0b;
}

.legend-dot.done {
  background: #16a34a;
}

.legend-dot.late {
  background: #ef4444;
}

.member-task-board {
  display: grid;
  min-width: 0;
}

.member-task-map {
  position: relative;
  display: grid;
  gap: 24px;
  min-width: 0;
  padding: 8px 0 4px;
}

.mindmap-links {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.mindmap-links path {
  fill: none;
  stroke: #b9c8ff;
  stroke-width: 2;
  stroke-linecap: round;
}

.member-task-map.has-links .mindmap-root::after,
.member-task-map.has-links .mindmap-branch-grid::before,
.member-task-map.has-links .mindmap-branch::before {
  display: none;
}

.mindmap-root {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  justify-self: center;
  width: min(420px, 100%);
  padding: 18px 20px;
  border: 2px solid #b9c8ff;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #eef4ff);
  text-align: center;
  box-shadow: 0 16px 36px rgba(49, 87, 213, 0.16);
}

.mindmap-root::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -25px;
  width: 2px;
  height: 24px;
  background: #b9c8ff;
}

.mindmap-root > span {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 950;
}

.mindmap-root strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.mindmap-root p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mindmap-root-stats {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  justify-self: center;
  margin-top: 5px;
  padding: 6px 10px;
  border: 1px solid #c7d7fe;
  border-radius: 999px;
  background: #fff;
}

.mindmap-root-stats b {
  color: var(--primary-dark);
  font-size: 18px;
  line-height: 1;
}

.mindmap-root-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mindmap-branch-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 24px 18px;
  padding-top: 24px;
}

.mindmap-branch-grid.is-custom {
  display: block;
  padding-top: 0;
}

.mindmap-branch-grid::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #b9c8ff 10%, #b9c8ff 90%, transparent);
}

.mindmap-branch {
  position: relative;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfcff);
  box-shadow: var(--shadow-soft);
}

.mindmap-branch-grid.is-custom .mindmap-branch {
  position: absolute;
  width: min(340px, calc(100% - 20px));
  transform: translateX(-50%);
}

.member-task-map.is-editing .mindmap-branch {
  cursor: grab;
  outline: 2px dashed rgba(49, 87, 213, 0.35);
  outline-offset: 4px;
  touch-action: none;
  user-select: none;
}

.member-task-map.is-editing .mindmap-branch.is-dragging {
  z-index: 5;
  cursor: grabbing;
  box-shadow: 0 24px 60px rgba(49, 87, 213, 0.22);
}

.mindmap-branch::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -24px;
  width: 2px;
  height: 24px;
  background: #b9c8ff;
}

.mindmap-branch.good {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #fff, #f7fffb);
}

.mindmap-branch.warning {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fff, #fffaf3);
}

.mindmap-branch.danger {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff, #fff7f7);
}

.mindmap-branch.quiet {
  background: #f8fafc;
}

.mindmap-member-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d6deea;
  border-radius: 8px;
  background: #fff;
}

.mindmap-member-node h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.mindmap-member-node p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.mindmap-member-node > strong {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 5px solid #dbe6ff;
  color: var(--primary-dark);
  font-size: 13px;
  line-height: 1;
}

.mindmap-branch.good .mindmap-member-node > strong {
  border-color: #bbf7d0;
  color: var(--green);
}

.mindmap-branch.warning .mindmap-member-node > strong {
  border-color: #fed7aa;
  color: #9a3412;
}

.mindmap-branch.danger .mindmap-member-node > strong {
  border-color: #fecaca;
  color: var(--red);
}

.mindmap-task-list {
  position: relative;
  display: grid;
  gap: 9px;
  padding-left: 18px;
}

.mindmap-task-list::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: #d6deea;
}

.mindmap-task-node {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 11px;
  border: 1px solid #e5e7eb;
  border-left: 5px solid #98a2b3;
  border-radius: 8px;
  background: #fff;
}

.mindmap-task-node::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  width: 16px;
  height: 2px;
  background: #d6deea;
}

.mindmap-task-node.progress {
  border-left-color: #f59e0b;
}

.mindmap-task-node.done {
  border-left-color: #16a34a;
}

.mindmap-task-node.late,
.mindmap-task-node.late_done {
  border-color: #fecaca;
  border-left-color: #ef4444;
  background: #fff7f7;
}

.mindmap-task-node strong,
.mindmap-task-node div > span {
  display: block;
  min-width: 0;
}

.mindmap-task-node strong {
  margin-bottom: 3px;
  color: var(--text);
  font-size: 14px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.mindmap-task-node div > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.mindmap-task-empty {
  position: relative;
  padding: 12px;
  border: 1px dashed #b8c0cc;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 850;
}

.mindmap-task-empty::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  width: 16px;
  height: 2px;
  background: #d6deea;
}

.member-task-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfcff);
  box-shadow: var(--shadow-soft);
}

.member-task-card.good {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #fff, #f7fffb);
}

.member-task-card.warning {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fff, #fffaf3);
}

.member-task-card.danger {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff, #fff7f7);
}

.member-task-card.quiet {
  background: #f8fafc;
}

.member-task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.member-task-card-head h3 {
  margin: 0 0 5px;
}

.completion-ring {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 6px solid #dbe6ff;
  background: #fff;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0;
}

.member-task-card.good .completion-ring {
  border-color: #bbf7d0;
  color: var(--green);
}

.member-task-card.warning .completion-ring {
  border-color: #fed7aa;
  color: #9a3412;
}

.member-task-card.danger .completion-ring {
  border-color: #fecaca;
  color: var(--red);
}

.member-task-distribution {
  display: flex;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.member-task-distribution span {
  min-width: 0;
  height: 100%;
}

.member-task-distribution .done {
  background: #16a34a;
}

.member-task-distribution .late_done {
  background: #d97706;
}

.member-task-distribution .progress {
  background: #f59e0b;
}

.member-task-distribution .todo {
  background: #98a2b3;
}

.member-task-distribution .late {
  background: #ef4444;
}

.member-task-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.member-task-stats span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 900;
}

.member-task-stats b {
  color: var(--text);
  font-size: 17px;
  line-height: 1;
}

.member-task-mini-list {
  display: grid;
  gap: 8px;
}

.member-task-mini {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 11px;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.member-task-mini.is-late {
  border-color: #fecaca;
  border-left-color: #ef4444;
  background: #fff7f7;
}

.member-task-mini strong,
.member-task-mini span {
  display: block;
  min-width: 0;
}

.member-task-mini strong {
  margin-bottom: 3px;
  color: var(--text);
  font-size: 14px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.member-task-mini span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.settings-main-card {
  min-width: 0;
}

.settings-side {
  display: grid;
  gap: 16px;
}

.settings-panel {
  display: grid;
  gap: 14px;
}

.settings-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-members-panel,
.settings-leave-panel {
  display: grid;
  gap: 14px;
}

.settings-member-list {
  display: grid;
  gap: 10px;
}

.settings-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfcff);
  box-shadow: var(--shadow-soft);
}

.settings-member-item h3 {
  margin: 0 0 4px;
}

.settings-member-item p {
  margin: 0;
}

.log-item.negative {
  border-color: #fecaca;
  background: #fff1f1;
}

.log-item.negative strong {
  color: var(--red);
}

.contract {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #cfd6e3;
  border-radius: 8px;
  background: #fbfcfe;
}

.contract p {
  margin: 0;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 800;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.empty {
  padding: 24px;
  border: 1px dashed #b8c0cc;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.compact-empty {
  padding: 12px;
  font-size: 13px;
}

.report-notice {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
}

.report-document {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.report-cover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 2px solid #101828;
}

.report-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

.report-cover h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.18;
  letter-spacing: 0;
}

.report-cover p {
  margin: 8px 0 0;
  color: var(--muted);
}

.report-meta {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 7px 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
}

.report-meta span,
.report-info-grid span,
.report-score-grid span,
.comparison-insights span,
.score-pill span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.report-section {
  display: grid;
  gap: 14px;
}

.report-section h2 {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
  letter-spacing: 0;
}

.report-info-grid,
.report-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.report-info-grid > div,
.report-score-grid > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.report-info-grid .wide {
  grid-column: 1 / -1;
}

.report-score-grid .wide {
  grid-column: 1 / -1;
}

.report-section-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.report-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.report-analysis-grid > div {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.report-analysis-grid h3,
.member-evaluation-notes h4 {
  margin: 0;
  font-size: 15px;
}

.contribution-chart {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.contribution-donut {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(210px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--segments, #d6deea 0 100%));
  box-shadow: 0 18px 42px rgba(35, 103, 244, 0.14);
}

.contribution-donut::before {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: inherit;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e3ecfb;
}

.contribution-donut > div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
  text-align: center;
}

.contribution-donut strong {
  color: var(--primary-dark);
  font-size: 30px;
  line-height: 1;
}

.contribution-donut span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.contribution-pie-list {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.comparison-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  border: 1px solid #e3ecfb;
  border-radius: 8px;
  background: #fff;
}

.comparison-color {
  width: 12px;
  height: 34px;
  border-radius: 999px;
}

.comparison-person {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.comparison-person strong {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.comparison-person span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.comparison-score {
  display: grid;
  gap: 4px;
  justify-items: end;
  min-width: 92px;
}

.comparison-score strong {
  font-size: 22px;
  line-height: 1;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid #d6deea;
  background: #f8fafc;
  color: #475467;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.risk-badge.medium {
  border-color: #f6d58f;
  background: #fff8e6;
  color: #8a4b00;
}

.risk-badge.high {
  border-color: #fecaca;
  background: #fff1f1;
  color: #b42318;
}

.comparison-insights {
  display: grid;
  gap: 8px;
}

.comparison-insights > div {
  display: grid;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf0f7;
}

.comparison-insights > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.review-target-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-target-list li {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #d6deea;
  border-radius: 8px;
  background: #fff;
}

.review-target-list li.medium {
  border-color: #f6d58f;
  background: #fffaf0;
}

.review-target-list li.high {
  border-color: #fecaca;
  background: #fff6f6;
}

.review-target-list span {
  color: var(--muted);
  font-size: 12px;
}

.review-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.review-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  font-size: 12px;
}

.review-table th,
.review-table td {
  padding: 10px;
  border-bottom: 1px solid #edf0f7;
  text-align: left;
  vertical-align: top;
}

.review-table th {
  background: #f8fafc;
  color: #475467;
  font-size: 11px;
  font-weight: 900;
}

.review-table tr:last-child td {
  border-bottom: 0;
}

.review-table tr.medium {
  background: #fffaf0;
}

.review-table tr.high {
  background: #fff7f7;
}

.review-table td strong,
.review-table td span {
  display: block;
}

.review-table td span {
  color: var(--muted);
}

.report-member-list {
  display: grid;
  gap: 14px;
}

.report-member-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.report-member-card.medium {
  border-color: #f6d58f;
  background: #fffdf8;
}

.report-member-card.high {
  border-color: #fecaca;
  background: #fffafa;
}

.report-member-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.report-member-head h3 {
  margin: 0;
}

.score-pill {
  display: grid;
  gap: 3px;
  min-width: 140px;
  padding: 10px 12px;
  border: 1px solid #c7d7fe;
  border-radius: 8px;
  background: #eef4ff;
  text-align: right;
}

.score-pill strong {
  color: var(--primary-dark);
  font-size: 26px;
  line-height: 1;
}

.score-bar {
  height: 10px;
  border-radius: 999px;
  background: #edf0f7;
  overflow: hidden;
}

.score-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--green));
}

.score-component-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  background: #edf0f7;
  overflow: hidden;
}

.score-component-bar span {
  display: block;
  height: 100%;
}

.score-component-bar .completion,
.component-legend .completion {
  background: #3157d5;
}

.score-component-bar .peer,
.component-legend .peer {
  background: #16805f;
}

.score-component-bar .leader,
.component-legend .leader {
  background: #7c3aed;
}

.component-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.component-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.component-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.component-legend .penalty {
  background: var(--red);
}

.report-task-list {
  display: grid;
  gap: 8px;
}

.report-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fbfcfe;
}

.report-task-row.negative {
  border-color: #fecaca;
  background: #fff7f7;
}

.report-task-row p {
  margin: 2px 0 0;
}

.task-detail-main {
  min-width: 0;
}

.task-detail-main > p:not(.muted) {
  margin: 3px 0 0;
  color: #475467;
  font-size: 13px;
}

.evidence-mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.evidence-mini-list span {
  display: inline-flex;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid #d6deea;
  border-radius: 999px;
  background: #fff;
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.member-evaluation-notes {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fbfcfe;
}

.evaluation-comment-list {
  display: grid;
  gap: 6px;
}

.evaluation-comment-list p {
  margin: 0;
  color: #475467;
  font-size: 13px;
}

.evaluation-comment-list strong {
  color: var(--text);
}

.audit-log-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.audit-log-head,
.audit-log-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.audit-log-head {
  padding: 7px 10px;
  background: #f8fafc;
  color: #475467;
  font-size: 11px;
  font-weight: 900;
}

.audit-log-row {
  min-height: 32px;
  padding: 6px 10px;
  border-top: 1px solid #edf0f7;
  font-size: 12px;
  line-height: 1.35;
}

.audit-log-row time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.audit-log-row strong {
  font-weight: 750;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.audit-log-row.negative {
  background: #fff7f7;
}

.audit-log-row.negative strong {
  color: var(--red);
}

.report-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 2px solid #101828;
  color: var(--muted);
}

.report-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.report-brand p,
.report-footer p {
  margin: 0;
}

.admin-list,
.admin-user-list {
  display: grid;
  gap: 10px;
}

.admin-list-item,
.admin-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.admin-user-card.suspended {
  border-color: #fecaca;
  background: #fff8f8;
}

.print-only {
  display: none;
}

.page-title {
  color: #0b1733;
}

.page > .page-head .page-title::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #24a083);
}

.page-subtitle {
  font-weight: 700;
}

.panel,
.card,
.form-card {
  position: relative;
  border-color: rgba(219, 230, 244, 0.98);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 253, 255, 0.92)),
    #fff;
  box-shadow: var(--shadow);
}

.panel::before,
.card::before,
.form-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, rgba(35, 103, 244, 0.9), rgba(36, 160, 131, 0.78), transparent 78%);
  opacity: 0.78;
  pointer-events: none;
}

.card h2,
.card h3,
.panel h2,
.panel h3,
.form-card h2,
.form-card h3 {
  color: #111d35;
}

.field label {
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea,
.dialog-input {
  border-color: #d7e4f5;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.dialog-input:hover {
  border-color: #b9cef0;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.dialog-input:focus {
  border-color: rgba(35, 103, 244, 0.72);
  box-shadow: 0 0 0 3px rgba(35, 103, 244, 0.12);
}

.button,
button.button {
  background: linear-gradient(135deg, #2367f4, #174ec5);
  box-shadow: 0 10px 24px rgba(35, 103, 244, 0.2);
}

.button:hover {
  background: linear-gradient(135deg, #1e5ddd, #143fa8);
  box-shadow: 0 14px 30px rgba(35, 103, 244, 0.24);
}

.button.secondary {
  border-color: #d7e4f5;
  background: #ffffff;
  color: #18243b;
}

.button.secondary:hover {
  border-color: #b9cef0;
  background: #f5f9ff;
  color: var(--primary-dark);
}

.button.danger,
.button.danger:hover {
  background: #fff;
}

.notice {
  border-color: #c8dbff;
  background: #eef5ff;
}

.metric {
  position: relative;
  overflow: hidden;
  border-color: #dbe7f6;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.metric::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(35, 103, 244, 0.72), rgba(36, 160, 131, 0.58));
}

.metric strong {
  color: #0b1733;
  font-weight: 950;
}

.submitted-evaluation {
  border-color: #b8c0ce;
  background:
    linear-gradient(180deg, rgba(241, 244, 249, 0.96), rgba(226, 232, 240, 0.94)),
    #e8edf5;
  color: #475467;
  cursor: not-allowed;
  filter: saturate(0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(31, 41, 55, 0.06);
}

.submitted-evaluation::before {
  background: linear-gradient(90deg, #7d8798, #c1c9d6, transparent 78%);
  opacity: 1;
}

.submitted-evaluation h3 {
  color: #293241;
}

.submitted-evaluation .muted,
.submitted-evaluation p {
  color: #5f6878;
}

.submitted-evaluation .status.done {
  background: #d7dde8;
  color: #475467;
}

.submitted-evaluation-score {
  display: grid;
  grid-template-columns: minmax(0, 220px);
  gap: 10px;
}

.submitted-evaluation .metric {
  border-color: #c3cad6;
  background: #dfe5ee;
  box-shadow: none;
}

.submitted-evaluation .metric::after {
  background: linear-gradient(90deg, #737d8f, #aab2c0);
}

.submitted-evaluation .metric span,
.submitted-evaluation .metric strong {
  color: #475467;
}

.grid.four .metric:nth-child(2)::after,
.report-summary-grid .metric:nth-child(2n)::after {
  background: linear-gradient(90deg, rgba(22, 128, 95, 0.74), rgba(36, 160, 131, 0.55));
}

.grid.four .metric:nth-child(3)::after,
.report-summary-grid .metric:nth-child(3n)::after {
  background: linear-gradient(90deg, rgba(161, 92, 0, 0.72), rgba(245, 158, 11, 0.5));
}

.grid.four .metric:nth-child(4)::after,
.report-summary-grid .metric:nth-child(4n)::after {
  background: linear-gradient(90deg, rgba(192, 52, 52, 0.68), rgba(248, 113, 113, 0.48));
}

.tabs {
  position: sticky;
  top: 76px;
  z-index: 8;
  padding: 8px;
  border: 1px solid rgba(219, 230, 244, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.tabs a {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.tabs a:hover {
  background: #f4f8ff;
  color: var(--primary-dark);
}

.tabs a.active {
  border-color: #c8dbff;
  background: var(--primary-soft);
}

.team-card {
  transition: background-color 0.18s ease, border-color 0.18s ease, filter 0.18s ease, transform 0.18s ease;
  overflow: hidden;
}

.team-card:hover {
  transform: translateY(-2px);
  border-color: #c8dbff;
}

.team-card.is-closed {
  border-color: #9aa7b8;
  background: linear-gradient(180deg, #e4e9f1, #d1d8e2);
  filter: saturate(0.72);
}

.task-card,
.log-item,
.settings-member-item,
.admin-list-item,
.admin-user-card,
.evidence-item,
.report-task-row {
  border-color: #dbe7f6;
  background: #ffffff;
}

.log-item {
  position: relative;
}

.task-card {
  position: relative;
}

.task-card::before,
.log-item::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: #c8dbff;
}

.task-card.is-mine {
  border-color: rgba(35, 103, 244, 0.46);
  box-shadow: 0 16px 34px rgba(35, 103, 244, 0.12);
}

.task-card.is-mine::before {
  background: var(--primary);
}

.my-task-chip,
.mindmap-root-stats,
.score-pill {
  background: var(--primary-soft);
}

.empty {
  border-color: #c8d6ea;
  background:
    linear-gradient(135deg, #ffffff, #f5f9ff),
    #fff;
}

.create-room-layout {
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 20px;
}

.create-room-card {
  min-height: 520px;
}

.create-room-aside {
  position: relative;
  overflow: hidden;
  border-color: #c8dbff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(240, 246, 255, 0.92)),
    #fff;
}

.create-room-aside::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 90px;
  background: linear-gradient(120deg, rgba(35, 103, 244, 0.16), rgba(36, 160, 131, 0.08), transparent);
  pointer-events: none;
}

.create-room-aside > * {
  position: relative;
}

.create-flow > div {
  border-color: #dbe7f6;
  background: rgba(255, 255, 255, 0.78);
}

.create-flow strong {
  background: linear-gradient(145deg, #2367f4, #174ec5);
}

.create-preview-grid > div,
.create-preview-block {
  border-color: #dbe7f6;
}

.member-task-map {
  padding: 12px 0 4px;
}

.mindmap-links path {
  stroke: #9fc0ff;
  stroke-width: 2.4;
}

.mindmap-root {
  border-color: #aac8ff;
  background: linear-gradient(180deg, #ffffff, #eef5ff);
  box-shadow: 0 16px 34px rgba(35, 103, 244, 0.14);
}

.mindmap-branch,
.member-task-card,
.mindmap-member-node,
.mindmap-task-node {
  border-color: #dbe7f6;
  background: #ffffff;
}

.mindmap-branch.good,
.member-task-card.good {
  border-color: #bcebd7;
}

.mindmap-branch.warning,
.member-task-card.warning {
  border-color: #f3d49d;
}

.mindmap-branch.danger,
.member-task-card.danger {
  border-color: #f2b6b6;
}

.settings-layout {
  gap: 20px;
}

.report-document {
  border-color: #dbe7f6;
  background: #ffffff;
}

.report-cover {
  border-bottom-color: #174ec5;
}

.report-footer {
  border-top-color: #174ec5;
}

.admin-user-card.suspended,
.log-item.negative,
.report-task-row.negative {
  border-color: #f2b6b6;
}

@media (max-width: 900px) {
  .report-cover,
  .report-summary-grid,
  .report-info-grid,
  .report-score-grid,
  .report-analysis-grid,
  .create-room-layout,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .contribution-chart {
    grid-template-columns: 1fr;
  }

  .comparison-score {
    justify-items: start;
  }
}

@media (max-width: 760px) {
  .topbar-inner,
  .page,
  .ad-shell {
    width: min(100% - 16px, 1180px);
  }

  .topbar-inner {
    height: auto;
    padding: 12px 0;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .brand {
    align-self: flex-start;
    max-width: 100%;
  }

  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
    overflow-x: visible;
    padding-bottom: 0;
    gap: 6px;
  }

  .nav-actions a {
    flex: 1 1 calc(50% - 3px);
    min-width: 0;
    padding: 9px 8px;
    border: 1px solid #edf0f7;
    background: #f8fafc;
    text-align: center;
  }

  .page-head {
    flex-direction: column;
    gap: 12px;
  }

  .ad-shell {
    margin-top: 10px;
  }

  .page + .ad-shell {
    margin-top: -54px;
    margin-bottom: 34px;
  }

  .app-ad-unit {
    min-height: 64px;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .create-preview-grid,
  .create-room-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
    white-space: normal;
    line-height: 1.2;
  }

  .panel,
  .form-card,
  .card,
  .report-document {
    padding: 16px;
  }

  .metric {
    padding: 14px;
  }

  .metric strong {
    font-size: 22px;
  }

  .tabs {
    position: static;
    flex-wrap: wrap;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .tabs a {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    text-align: center;
  }

  .dialog-backdrop {
    padding: 10px;
  }

  .dialog-box {
    width: 100%;
    max-height: calc(100dvh - 20px);
    overflow: auto;
    padding: 18px;
  }

  .dialog-actions .button {
    flex: 1 1 140px;
  }

  .table {
    min-width: 0;
    table-layout: fixed;
  }

  .table th,
  .table td {
    padding: 8px;
    font-size: 12px;
  }

  .task-card-head,
  .member-task-panel-head,
  .member-task-card-head,
  .settings-member-item,
  .report-member-head,
  .report-task-row,
  .report-footer,
  .admin-list-item,
  .admin-user-card,
  .evidence-item {
    flex-direction: column;
    align-items: stretch;
  }

  .member-task-legend {
    justify-content: flex-start;
  }

  .member-task-tools,
  .mindmap-controls {
    justify-items: stretch;
    justify-content: stretch;
  }

  .mindmap-controls .button {
    flex: 1 1 120px;
  }

  .mindmap-branch-grid,
  .member-task-board {
    grid-template-columns: 1fr;
  }

  .member-task-map {
    overflow: hidden;
  }

  .mindmap-root {
    justify-self: stretch;
    padding: 16px;
  }

  .mindmap-root-stats {
    flex-wrap: wrap;
  }

  .mindmap-branch-grid::before {
    left: 50%;
    right: auto;
    width: 2px;
    height: 24px;
    background: #b9c8ff;
  }

  .mindmap-member-node,
  .mindmap-task-node {
    grid-template-columns: 1fr;
  }

  .mindmap-member-node {
    flex-direction: column;
    align-items: stretch;
  }

  .mindmap-branch-grid.is-custom {
    display: grid;
    min-height: 0 !important;
    padding-top: 24px;
  }

  .mindmap-branch-grid.is-custom .mindmap-branch {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: auto;
    transform: none;
  }

  .member-task-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-task-mini {
    grid-template-columns: 1fr;
  }

  .settings-status-grid {
    grid-template-columns: 1fr;
  }

  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }

  .form-actions {
    justify-content: stretch;
  }

  .score-pill {
    text-align: left;
  }

  .risk-badge {
    white-space: normal;
  }

  .report-cover h1 {
    font-size: 26px;
  }

  .report-meta {
    grid-template-columns: 1fr;
  }

  .audit-log-head {
    display: none;
  }

  .audit-log-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-width: 420px) {
  .topbar-inner,
  .page,
  .ad-shell {
    width: min(100% - 12px, 1180px);
  }

  .page {
    padding-top: 24px;
  }

  .page-title {
    font-size: 24px;
  }

  .panel,
  .form-card,
  .card,
  .report-document {
    padding: 14px;
  }

  .nav-actions a,
  .tabs a {
    flex-basis: calc(50% - 4px);
  }

  .member-task-stats,
  .report-summary-grid {
    grid-template-columns: 1fr;
  }

  .contribution-chart {
    grid-template-columns: 1fr;
  }

  .metric {
    padding: 12px;
  }

  .metric strong {
    font-size: 20px;
  }

  .mindmap-root strong {
    font-size: 22px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .topbar,
  .tabs,
  .no-print,
  .button {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .page {
    width: 100%;
    padding: 0;
  }

  .report-document {
    gap: 12px;
    font-size: 11px;
  }

  .panel,
  .card,
  .form-card,
  .metric,
  .report-document,
  .report-member-card {
    box-shadow: none;
  }

  .report-document {
    display: flex;
    flex-direction: column;
    min-height: calc(297mm - 24mm);
    border: 0;
    padding: 0;
  }

  .report-footer {
    margin-top: auto;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-cover {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 14px;
    padding-bottom: 12px;
  }

  .report-cover h1 {
    font-size: 24px;
  }

  .report-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .metric {
    padding: 8px;
  }

  .metric strong {
    font-size: 18px;
  }

  .report-section {
    gap: 8px;
  }

  .report-section h2 {
    font-size: 15px;
    padding-bottom: 5px;
  }

  .report-analysis-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(210px, 0.75fr);
    gap: 8px;
  }

  .report-analysis-grid > div,
  .report-info-grid > div,
  .report-score-grid > div,
  .member-evaluation-notes,
  .report-member-card,
  .report-task-row {
    padding: 7px;
  }

  .contribution-chart {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 8px;
  }

  .contribution-donut strong {
    font-size: 20px;
  }

  .comparison-row {
    grid-template-columns: 8px minmax(0, 1fr) 68px;
    gap: 7px;
    min-height: 36px;
    padding: 5px;
  }

  .comparison-color {
    width: 8px;
    height: 24px;
  }

  .comparison-score strong {
    font-size: 15px;
  }

  .risk-badge {
    padding: 2px 5px;
    font-size: 8.5px;
  }

  .component-legend,
  .review-target-list span,
  .comparison-person span,
  .evaluation-comment-list p,
  .task-detail-main > p:not(.muted) {
    font-size: 9.5px;
  }

  .report-score-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .report-section,
  .log-item,
  .review-table tr,
  .audit-log-row {
    break-inside: avoid;
  }

  .report-member-card {
    break-inside: auto;
    gap: 8px;
    margin-bottom: 8px;
  }

  .review-table-wrap {
    overflow: visible;
  }

  .review-table {
    min-width: 0;
    table-layout: fixed;
    font-size: 8.2px;
  }

  .review-table th,
  .review-table td {
    padding: 4px;
    overflow-wrap: anywhere;
  }

  .review-table th:nth-child(1),
  .review-table td:nth-child(1) {
    width: 28px;
  }

  .review-table th:nth-child(3),
  .review-table td:nth-child(3) {
    width: 58px;
  }

  .review-table th:nth-child(8),
  .review-table td:nth-child(8) {
    width: 24%;
  }

  .report-task-row {
    gap: 6px;
  }

  .evidence-mini-list {
    gap: 3px;
  }

  .evidence-mini-list span {
    padding: 2px 5px;
    font-size: 8.5px;
  }

  .audit-log-row {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 10.5px;
  }

  .audit-log-row time {
    font-size: 10px;
  }

  .print-only {
    display: block;
  }
}
