:root {
  --color-primary: #3d5a99;
  --color-secondary: #2a9d8f;
  --color-accent: #ff6b6b;
  --color-success: #2e9e6b;
  --color-warning: #f4a261;
  --color-danger: #e03e3e;
  --color-bg: #f5f7ff;
  --color-text: #1a1f36;
  --color-muted: #5a6580;
  --color-border: #dce3f5;
  --color-card: #ffffff;
  --shadow-soft: 0 8px 24px rgba(61, 90, 153, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #eef1fb 0%, #f5f7ff 100%);
  color: var(--color-text);
  line-height: 1.6;
}

a { color: var(--color-primary); }

.site-header, .container, .site-footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #dce3f5;
  backdrop-filter: blur(8px);
}

.brand {
  text-decoration: none;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
}

.brand img {
  border-radius: 0.35rem;
  box-shadow: 0 2px 8px rgba(61, 90, 153, 0.18);
}

nav { display: flex; gap: .9rem; flex-wrap: wrap; }

nav a {
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.2rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-bottom-color 160ms ease;
}

nav a:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}

.container {
  margin-top: 1rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  padding: 1.5rem;
}

section,
.card-soft {
  border: 1px solid #e4eaf8;
  background: #fafbff;
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  margin: 1rem 0;
  transition: box-shadow 180ms ease;
}

section:hover,
.card-soft:hover {
  box-shadow: 0 4px 16px rgba(61, 90, 153, 0.08);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.85rem 0;
}

.button {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: .76rem 1.3rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.button:hover {
  background: #e85555;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 107, 107, 0.28);
}

.button-alt {
  background: #fff;
  color: var(--color-primary);
  border-color: #c7d3ef;
}

.button-alt:hover {
  background: #f0f3fd;
  box-shadow: 0 4px 12px rgba(61, 90, 153, 0.12);
  transform: translateY(-2px);
}

.button-ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: #c7d3ef;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}

.status-strip > div {
  border: 1px solid #dce3f5;
  border-radius: 10px;
  background: linear-gradient(135deg, #f5f7ff 0%, #eef1fb 100%);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.status-strip strong {
  font-size: 0.88rem;
  color: var(--color-primary);
}

.status-strip span {
  color: var(--color-muted);
  font-size: 0.84rem;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.grid-two .card-soft h2 {
  color: var(--color-primary);
  margin-top: 0;
}

.track-form {
  display: grid;
  gap: 0.55rem;
  max-width: 640px;
}

.track-form label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
}

.track-form input {
  border: 1.5px solid #c7d3ef;
  border-radius: 8px;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  outline: none;
}

.track-form input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(61, 90, 153, 0.12);
}

ul.cards { list-style: none; padding: 0; display: grid; gap: .8rem; }

ul.cards li {
  border: 1px solid #dce3f5;
  border-radius: 10px;
  padding: .95rem;
  background: #fff;
}

.chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.84rem;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.chip-emergency {
  background: #fff0f0;
  color: #c0302b;
  border-color: #f5c4bd;
}

.chip-urgent {
  background: #fff7ed;
  color: #9a4a00;
  border-color: #fed7aa;
}

.chip-routine {
  background: #edfaf4;
  color: #1b6b3a;
  border-color: #a7dfc0;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.75rem 0 1rem;
}

.flow-steps span {
  font-size: 0.8rem;
  border-radius: 999px;
  border: 1px solid #c7d3ef;
  background: #f5f7ff;
  color: var(--color-primary);
  text-align: center;
  padding: 0.25rem 0.5rem;
  font-weight: 500;
  animation: slide-in 220ms ease both;
}

.timeline-preview {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.timeline-preview li {
  border-left: 4px solid var(--color-accent);
  padding: 0.5rem 0.75rem;
  background: #fafbff;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--color-text);
  animation: fade-up 220ms ease both;
}

.timeline-preview li:nth-child(1) { border-left-color: #c7d3ef; }
.timeline-preview li:nth-child(2) { border-left-color: #a5b6e0; }
.timeline-preview li:nth-child(3) { border-left-color: #7a9dd4; }
.timeline-preview li:nth-child(4) { border-left-color: #f4a261; }
.timeline-preview li:nth-child(5) { border-left-color: var(--color-success); }

details summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.4rem 0;
  color: var(--color-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

details summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--color-accent);
  transition: transform 200ms ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  color: var(--color-muted);
  margin: 0.4rem 0 0.2rem;
  font-size: 0.95rem;
}

.approval-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.approval-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e4eaf8;
  overflow: hidden;
}

.approval-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 300ms ease;
}

.approval-fill--danger { background: var(--color-danger); }
.approval-fill--warn { background: var(--color-warning); }
.approval-fill--good { background: var(--color-success); }

.muted { color: var(--color-muted); }

h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.site-footer {
  color: var(--color-muted);
  font-size: .92rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #dce3f5;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--color-muted);
  text-decoration: none;
  transition: color 160ms ease;
}

.site-footer a:hover {
  color: var(--color-primary);
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-two { grid-template-columns: 1fr; }
  .flow-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .container { padding: 1rem; border-radius: 10px; margin-top: 0.5rem; }
  .status-strip { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; }
  .button { text-align: center; }
  h1 { font-size: 1.3rem; }
  nav { gap: 0.6rem; font-size: 0.9rem; }
}

@media (max-width: 640px) {
  .container {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    margin-top: 0;
  }
  .site-header { position: static; }
  .status-strip { grid-template-columns: 1fr; }
}
