:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f4f8;
  --line: #e4e8ef;
  --text: #14171a;
  --muted: #6b7280;
  --blue: #3182f6;
  --blue-dark: #1266d6;
  --green: #12b886;
  --red: #fa5252;
  --orange: #f59f00;
  --violet: #7950f2;
  --shadow: 0 18px 45px rgba(22, 28, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
  letter-spacing: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 22px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), #00c2ff);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 16px;
}

.brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  text-align: left;
}

.nav-item span {
  color: var(--muted);
  font-size: 18px;
}

.nav-item b {
  font-weight: 700;
}

.nav-item:hover,
.nav-item.is-active {
  background: #edf5ff;
  color: var(--blue-dark);
}

.main {
  min-width: 0;
  padding: 28px 32px 44px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.topbar h1,
.section-head h2 {
  margin: 0;
  line-height: 1.22;
}

.topbar h1 {
  max-width: 760px;
  font-size: 34px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.soft-button,
.soft-link,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  white-space: nowrap;
}

.file-label {
  position: relative;
  overflow: hidden;
}

.file-label input {
  position: absolute;
  inset: 0;
  cursor: pointer;
  opacity: 0;
}

.icon-button {
  width: 38px;
  background: var(--surface);
  color: var(--muted);
  font-size: 18px;
}

.soft-button,
.soft-link {
  padding: 0 14px;
  background: var(--surface);
  color: #334155;
  font-weight: 700;
}

.primary-link {
  padding: 0 16px;
  border-color: var(--blue);
  background: var(--blue);
  color: white;
  font-weight: 800;
}

.view {
  display: none;
}

.view.is-visible {
  display: grid;
  gap: 18px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.metric-card,
.panel,
.job-card,
.global-card,
.letter-card,
.check-card,
.prep-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 18px;
}

.metric-label,
.label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-value {
  font-size: 32px;
  font-weight: 850;
}

.metric-meta {
  color: #64748b;
  font-size: 13px;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.55fr);
  gap: 18px;
}

.panel {
  padding: 20px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head.standalone {
  margin-bottom: 0;
}

.section-note {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: var(--green);
}

.status-dot.urgent {
  background: var(--orange);
  box-shadow: 0 0 0 8px rgba(245, 159, 0, 0.12);
}

.action-list {
  display: grid;
  gap: 12px;
}

.action-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.action-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: white;
  color: var(--blue);
  font-weight: 850;
}

.action-item strong {
  display: block;
  margin-bottom: 3px;
}

.action-item span {
  color: var(--muted);
  font-size: 13px;
}

.ring {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--blue) 0deg, #dce8ff 0deg);
}

.ring span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: white;
  font-weight: 850;
  font-size: 15px;
}

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

.readiness-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.bar {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf4;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.job-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}

.pipeline-lane {
  display: grid;
  align-content: start;
  min-height: 178px;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.pipeline-lane h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  font-size: 14px;
}

.pipeline-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.pipeline-card strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.pipeline-card span {
  color: var(--muted);
  font-size: 12px;
}

.mini-job {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.company-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.company-badge {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: #edf5ff;
  color: var(--blue-dark);
  font-weight: 850;
}

.company-line strong {
  overflow-wrap: anywhere;
}

.chip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #edf5ff;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.chip.ready {
  background: #e7f8f2;
  color: #087f5b;
}

.chip.risk {
  background: #fff4db;
  color: #b7791f;
}

.chip.hold {
  background: #ffe3e3;
  color: #c92a2a;
}

.chip.radar {
  background: #f1f3f5;
  color: #495057;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
}

.category-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.category-pill {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.category-pill strong {
  font-size: 20px;
}

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

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.segmented {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.segmented button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 750;
}

.segmented button.is-active {
  background: var(--blue);
  color: white;
}

.job-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
}

.job-list {
  display: grid;
  gap: 12px;
}

.job-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
}

.job-card.is-selected {
  border-color: var(--blue);
  box-shadow: 0 12px 34px rgba(49, 130, 246, 0.16);
}

.job-card h3,
.global-card h3,
.letter-card h3,
.check-card h3,
.prep-card h3 {
  margin: 0;
  line-height: 1.3;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.deadline {
  color: #475569;
  font-size: 13px;
  font-weight: 750;
}

.deadline.due-soon {
  color: #c92a2a;
}

.deadline.safe {
  color: #087f5b;
}

.detail-panel {
  position: sticky;
  top: 28px;
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.note-box {
  display: grid;
  gap: 8px;
}

.note-box textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
  line-height: 1.5;
}

.note-box textarea:focus {
  border-color: var(--blue);
  background: white;
  box-shadow: 0 0 0 4px rgba(49, 130, 246, 0.12);
}

.detail-actions a,
.detail-actions button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: #334155;
  cursor: pointer;
  font-weight: 800;
}

.checklist-grid,
.letter-grid,
.global-grid,
.search-grid,
.universe-grid,
.kpi-grid,
.roadmap-grid,
.prep-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.profile-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

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

.profile-field.wide {
  grid-column: span 3;
}

.profile-field input,
.profile-field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
}

.profile-field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.profile-field input:focus,
.profile-field textarea:focus {
  border-color: var(--blue);
  background: white;
  box-shadow: 0 0 0 4px rgba(49, 130, 246, 0.12);
}

.check-card,
.letter-card,
.global-card,
.search-card,
.universe-card,
.kpi-card,
.roadmap-card,
.prep-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.check-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.toggle {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 0;
  background: #d7dde7;
  cursor: pointer;
}

.toggle::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  content: "";
  transition: transform 0.18s ease;
}

.toggle.is-on {
  background: var(--blue);
}

.toggle.is-on::after {
  transform: translateX(20px);
}

.letter-card p,
.global-card p,
.prep-card p,
.detail-panel p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.copy-button {
  min-height: 38px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #edf5ff;
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 850;
}

.global-card {
  align-content: start;
}

.search-card {
  align-content: start;
}

.universe-grid {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.universe-card {
  align-content: start;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.kpi-card strong {
  font-size: 28px;
}

.roadmap-card {
  align-content: start;
}

.roadmap-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #475569;
  line-height: 1.45;
}

.global-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.global-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.global-links a,
.search-links a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.universe-card a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.search-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  min-width: 180px;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #111827;
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .sidebar {
    padding: 18px 12px;
  }

  .brand {
    justify-content: center;
    padding: 8px 0 20px;
  }

  .brand div:last-child,
  .nav-item b {
    display: none;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
  }

  .metric-grid,
  .job-strip {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .pipeline-board {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .section-grid,
  .job-layout {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    z-index: 5;
    height: auto;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    display: none;
  }

  .nav-list {
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
  }

  .nav-item {
    min-height: 42px;
  }

  .main {
    padding: 20px 14px 32px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .head-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-note {
    text-align: left;
  }

  .topbar h1 {
    font-size: 27px;
  }

  .metric-grid,
  .pipeline-board,
  .profile-form,
  .category-summary,
  .job-strip,
  .checklist-grid,
  .letter-grid,
  .global-grid,
  .search-grid,
  .universe-grid,
  .kpi-grid,
  .roadmap-grid,
  .prep-grid,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .profile-field.wide {
    grid-column: span 1;
  }

  .segmented {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .job-card {
    grid-template-columns: 1fr;
  }
}
