:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #fbfdff;
  --primary: #0f2f57;
  --primary-strong: #123f75;
  --secondary: #1f6fb2;
  --text: #1d2430;
  --muted: #5f6b7a;
  --border: #dce3eb;
  --success-bg: #edf8f1;
  --success-text: #216b45;
  --warning-bg: #fff7e8;
  --warning-text: #946200;
  --danger-bg: #fff1f1;
  --danger-text: #9d3f3f;
  --shadow: 0 10px 30px rgba(15, 47, 87, 0.08);
  --radius: 16px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.header {
  background: var(--primary);
  border-bottom: 4px solid var(--secondary);
  color: #fff;
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 182px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.brand-text small {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.brand-text strong {
  display: block;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.hero {
  padding: 48px 0 26px;
}

.hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f4f8fd 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 42px;
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #d4e3f3;
  background: #eaf2fb;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 18px;
}

h1,
h2,
h3 {
  margin: 0 0 14px;
  color: var(--primary);
  line-height: 1.2;
}

h1 {
  font-size: 38px;
  letter-spacing: -0.03em;
  max-width: 940px;
}

h2 {
  font-size: 30px;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 20px;
}

p {
  margin: 0 0 16px;
  color: var(--muted);
}

.lead {
  font-size: 18px;
  max-width: 930px;
}

.hero-panels {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 20px;
  margin-top: 28px;
}

.panel {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  border-radius: var(--radius);
  padding: 22px;
}

.panel.soft {
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7fc 100%);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  font: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.secondary {
  background: #fff;
  color: var(--primary);
  border-color: var(--border);
}

.btn.primary:hover {
  background: var(--primary-strong);
}

.btn.secondary:hover {
  background: #f5f8fc;
}

.section {
  padding: 18px 0;
}

.section-head {
  margin-bottom: 18px;
}

.section-head p {
  max-width: 880px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-card,
.metric-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  background: #fff;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4fb;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.status-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}

.status.success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: #cfe7d8;
}

.status.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border-color: #ecdca9;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.timeline-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.media-grid {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.media-grid-admin,
.media-grid-portal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-grid-admin {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-grid-single {
  grid-template-columns: 1fr;
}

.media-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.media-zoom {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #edf3f8;
  cursor: zoom-in;
}

.media-zoom-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px rgba(15, 47, 87, 0.08);
}

.media-card img {
  width: 100%;
  height: auto;
  background: #edf3f8;
}

.media-card-compact-preview .media-zoom {
  max-height: 340px;
  overflow: hidden;
}

.media-preview-cropped {
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: top center;
}

.media-card .media-zoom img {
  transition: transform 0.24s ease;
}

.media-card:hover .media-zoom img {
  transform: scale(1.01);
}

.media-body {
  padding: 18px;
}

ul.clean {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

ul.clean li + li {
  margin-top: 8px;
}

.checklist-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.checklist-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.checklist-flow-step {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f9fcff;
  padding: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.checklist-flow-step.is-active {
  border-color: #9fc3e4;
  background: #eef6ff;
  box-shadow: 0 0 0 3px rgba(31, 111, 178, 0.18);
  transform: translateY(-1px);
  animation: checklist-step-flash 1.1s ease;
}

.checklist-flow-step-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.checklist-flow-step strong {
  display: block;
  color: var(--primary);
  margin-bottom: 4px;
}

.checklist-flow-step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

@keyframes checklist-step-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(31, 111, 178, 0.42);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(31, 111, 178, 0.18);
  }
}

.checklist-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.checklist-kpi {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fbfdff;
}

.checklist-kpi small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.checklist-kpi strong {
  display: block;
  margin-top: 2px;
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
}

.checklist-recommendation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  background: #fff;
}

.checklist-recommendation small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.checklist-recommendation strong {
  display: block;
  color: var(--primary);
  font-size: 16px;
  margin-top: 2px;
}

.checklist-recommendation[data-status="approved"] {
  border-color: #cfe7d8;
  background: var(--success-bg);
}

.checklist-recommendation[data-status="partial"] {
  border-color: #ecdca9;
  background: var(--warning-bg);
}

.checklist-recommendation[data-status="rejected"] {
  border-color: #f1caca;
  background: var(--danger-bg);
}

.checklist-recommendation[data-status="in_progress"] {
  border-color: var(--border);
  background: #fff;
}

.checklist-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.checklist-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.checklist-table th,
.checklist-table td {
  border-bottom: 1px solid var(--border);
  padding: 12px;
  vertical-align: top;
}

.checklist-table th {
  background: linear-gradient(180deg, #eff5fb 0%, #eaf2fb 100%);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.checklist-table th:first-child,
.checklist-table th:last-child {
  text-align: left;
}

.checklist-table td:first-child {
  min-width: 300px;
}

.checklist-table td:first-child small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.checklist-table td:nth-child(2),
.checklist-table td:nth-child(3),
.checklist-table td:nth-child(4) {
  text-align: center;
  vertical-align: middle;
  width: 110px;
}

.checklist-table td input[type="radio"] {
  width: 18px;
  height: 18px;
}

.checklist-table td input[type="text"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 40px;
  padding: 9px 10px;
  font: inherit;
}

.approval-box {
  border: 1px dashed #b9c7d7;
  border-radius: 14px;
  background: #fbfdff;
  padding: 22px;
}

.approval-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.approval-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid-spaced {
  margin-top: 16px;
}

.field {
  margin-top: 16px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.form-feedback {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.form-feedback[data-status="success"] {
  color: var(--success-text);
}

.form-feedback[data-status="error"] {
  color: var(--danger-text);
}

.form-feedback[data-status="info"] {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  width: min(360px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 47, 87, 0.16);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast[data-status="success"] {
  border-color: #cfe9d8;
  background: #f4fbf7;
}

.toast[data-status="info"] {
  border-color: var(--border);
  background: #fff;
}

.toast[data-status="error"] {
  border-color: #f1caca;
  background: var(--danger-bg);
}

.toast-title {
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.toast-message {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 27, 49, 0.78);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.lightbox-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 75%, rgba(255, 255, 255, 0));
}

.lightbox-zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-tool,
.lightbox-close {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lightbox-close {
  margin-left: auto;
}

.lightbox-content {
  padding: 24px 24px 12px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  cursor: grab;
}

.lightbox-content img {
  display: block;
  width: 100%;
  height: auto;
  background: #edf3f8;
  border-radius: 14px;
  transition: width 0.18s ease;
}

.lightbox-content.is-zoomed {
  cursor: grab;
}

.lightbox-content.is-dragging {
  cursor: grabbing;
}

.lightbox-meta {
  padding: 0 24px 24px;
}

.lightbox-meta h3 {
  margin-bottom: 8px;
}

.lightbox-meta p {
  margin-bottom: 0;
}

.footer {
  padding: 28px 0 56px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.footer-inner strong {
  color: var(--primary);
}

@media (max-width: 1080px) {
  .grid-4,
  .grid-3,
  .hero-panels,
  .media-grid-portal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-grid-admin {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 26px;
  }

  .hero-card,
  .card,
  .approval-box {
    padding: 24px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .checklist-flow,
  .checklist-summary,
  .checklist-kpis,
  .hero-panels,
  .approval-grid,
  .form-grid,
  .media-grid-admin,
  .media-grid-portal,
  .analysis-grid-copy {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .checklist-recommendation {
    flex-direction: column;
    align-items: flex-start;
  }

  .header {
    position: static;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }

  .lightbox {
    padding: 16px;
  }

  .media-zoom-badge {
    top: 10px;
    right: 10px;
    min-height: 26px;
    font-size: 10px;
  }

  .media-card-compact-preview .media-zoom,
  .media-preview-cropped {
    max-height: 240px;
    height: 240px;
  }

  .lightbox-dialog {
    width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
  }

  .lightbox-toolbar {
    flex-wrap: wrap;
    padding: 12px 12px 0;
  }

  .lightbox-content {
    padding: 16px 16px 8px;
  }

  .lightbox-meta {
    padding: 0 16px 16px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .header,
  .actions,
  .btn,
  .toast,
  .lightbox {
    display: none !important;
  }

  .hero,
  .section,
  .footer {
    padding: 8px 0;
  }

  .hero-card,
  .card,
  .approval-box {
    padding: 18px;
  }

  .hero-card,
  .card,
  .info-card,
  .metric-card,
  .timeline-item,
  .media-card,
  .approval-item,
  .approval-box {
    box-shadow: none;
    break-inside: avoid;
  }

  .hero-panels,
  .grid-2,
  .grid-3,
  .grid-4,
  .checklist-summary,
  .checklist-kpis,
  .approval-grid,
  .form-grid,
  .media-grid-admin,
  .media-grid-portal,
  .media-grid-single {
    grid-template-columns: 1fr;
  }

  .checklist-table {
    min-width: 100%;
  }

  .checklist-table th,
  .checklist-table td {
    padding: 8px;
  }

  .media-card img {
    max-height: 430px;
    object-fit: contain;
  }

  .media-crop {
    height: 240px;
  }

  .media-body,
  .approval-item,
  .info-card,
  .metric-card {
    padding: 14px;
  }

  p,
  li {
    font-size: 12px;
  }

  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 16px;
  }
}