/*!********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./src/styles/globals.css ***!
  \********************************************************************************************************************************************************************************************************************************************************************/
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  --ink: #142033;
  --ink-soft: #2a3a52;
  --slate: #5a6b82;
  --line: #d5dde8;
  --paper: #f7f5f0;
  --paper-deep: #efebe3;
  --card: #ffffff;
  --accent: #0f6b5c;
  --accent-soft: #e4f3ef;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --danger: #9f1239;
  --danger-soft: #ffe4e6;
  --shadow: 0 12px 40px rgba(20, 32, 51, 0.08);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 0% 0%, rgba(15, 107, 92, 0.08), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(180, 83, 9, 0.07), transparent 35%),
    linear-gradient(180deg, #fbfaf7 0%, var(--paper) 50%, var(--paper-deep) 100%);
  color: var(--ink);
  font-family: var(--font-body);
}

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

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

button {
  cursor: pointer;
}

.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  animation: rise 0.5s ease both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #0f6b5c, #184a5c);
  color: white;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 8px 20px rgba(15, 107, 92, 0.28);
}

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand p {
  margin: 2px 0 0;
  color: var(--slate);
  font-size: 0.92rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--ink);
  color: white;
  box-shadow: 0 8px 18px rgba(20, 32, 51, 0.18);
}

.btn-primary:hover {
  background: #0d1726;
}

.btn-secondary {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-soft);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
}

.panel {
  background: var(--card);
  border: 1px solid rgba(213, 221, 232, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 14px;
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 18px 18px 16px;
  animation: rise 0.55s ease both;
}

.stat-card:nth-child(2) {
  animation-delay: 0.05s;
}
.stat-card:nth-child(3) {
  animation-delay: 0.1s;
}
.stat-card:nth-child(4) {
  animation-delay: 0.15s;
}

.stat-label {
  color: var(--slate);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stat-value {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  animation: rise 0.6s ease both;
}

.toolbar input,
.toolbar select,
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  background: #fff;
  color: var(--ink);
}

.toolbar input {
  min-width: 220px;
  flex: 1 1;
}

.toolbar select {
  width: auto;
  min-width: 160px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.case-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: rise 0.65s ease both;
}

.case-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(20, 32, 51, 0.12);
}

.case-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-teal {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge-slate {
  background: #eef2f7;
  color: var(--ink-soft);
}

.badge-rose {
  background: var(--danger-soft);
  color: var(--danger);
}

.case-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.25;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--slate);
  font-size: 0.9rem;
}

.summary-clip {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  animation: rise 0.45s ease both;
}

.page-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: -0.02em;
}

.page-header p {
  margin: 6px 0 0;
  color: var(--slate);
}

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

.layout-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-gap: 16px;
  gap: 16px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section {
  padding: 18px 20px 20px;
}

.section h3,
.section-title-row {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field label,
.hint-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.hint-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.field-hint {
  margin: 0;
  color: var(--slate);
  font-size: 0.82rem;
  line-height: 1.4;
}

.stage-callout {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.progress-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.progress-meter {
  height: 6px;
  border-radius: 999px;
  background: #e8eef4;
  overflow: hidden;
}

.progress-meter-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1a7a6a, #0f6b5c);
  transition: width 0.35s ease;
}

.progress-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.progress-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-gap: 12px;
  gap: 12px;
  min-height: 56px;
}

.progress-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.progress-rail::before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: -4px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: #d7e0ea;
}

.progress-item:last-child .progress-rail::before {
  display: none;
}

.progress-item.is-done .progress-rail::before,
.progress-item.is-current .progress-rail::before {
  background: #9ecfc4;
}

.progress-node {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  border: 2px solid #c9d5e3;
  background: #fff;
  color: var(--slate);
}

.progress-item.is-done .progress-node {
  background: var(--accent-soft);
  border-color: #7db8ab;
  color: var(--accent);
}

.progress-item.is-current .progress-node {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(20, 32, 51, 0.12);
}

.progress-item.is-upcoming .progress-body {
  opacity: 0.62;
}

.progress-body {
  padding-bottom: 14px;
}

.progress-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.progress-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
}

.progress-item.is-current .progress-name {
  color: var(--ink);
}

.progress-desc {
  margin: 2px 0 0;
  color: var(--slate);
  font-size: 0.86rem;
  line-height: 1.35;
}

.progress-current-note {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f3f6f9;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.4;
}

.progress-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--ink);
  color: #fff;
  text-transform: uppercase;
}

.progress-pill.muted-pill {
  background: #e7eef5;
  color: var(--slate);
}

.info-tip {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.info-tip-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, serif;
  line-height: 1;
  padding: 0;
  display: inline-grid;
  place-items: center;
  cursor: help;
}

.info-tip-btn:hover,
.info-tip.is-open .info-tip-btn,
.info-tip-btn:focus-visible {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  outline: none;
}

.info-tip-bubble {
  position: absolute;
  z-index: 40;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: min(280px, 70vw);
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ink);
  color: #f5f7fa;
  font-size: 0.8rem;
  font-weight: 500;
  font-style: normal;
  line-height: 1.45;
  box-shadow: 0 10px 28px rgba(20, 32, 51, 0.28);
  text-transform: none;
  letter-spacing: 0;
}

.info-tip-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink);
}

.step.current .info-tip-btn {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.step.current .info-tip-btn:hover,
.step.current .info-tip.is-open .info-tip-btn {
  background: #fff;
  color: var(--ink);
}

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

.stepper {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.step {
  min-width: 100px;
  flex: 1 1;
  text-align: center;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fafbfc;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.step.done {
  background: var(--accent-soft);
  border-color: #b7ddd4;
}

.step.current {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(20, 32, 51, 0.2);
}

.step-label-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.step-label {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline li {
  display: grid;
  grid-template-columns: 14px 1fr;
  grid-gap: 12px;
  gap: 12px;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 4px;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-body strong {
  display: block;
  font-size: 0.95rem;
}

.timeline-body span,
.muted {
  color: var(--slate);
  font-size: 0.86rem;
}

.journal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.journal-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fbfcfd;
}

.journal-item header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.journal-item h4 {
  margin: 0;
  font-size: 1rem;
}

.journal-item p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
  white-space: pre-wrap;
}

.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--slate);
}

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

.party-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4f7fa;
  border: 1px solid var(--line);
}

.party-chip strong {
  font-size: 0.95rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .layout-2,
  .field-row {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding: 18px 14px 48px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

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

