:root {
  --blue-900: #0b3d91;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-100: #eaf1ff;
  --green-500: #10b981;
  --green-100: #e7fbf3;
  --purple-500: #7c6cf6;
  --purple-100: #f1edff;
  --ink: #14213d;
  --muted: #6b7688;
  --line: #e7ebf3;
  --card-radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 800px at 20% -10%, #2a6df4 0%, #0b3d91 45%, #071c47 100%);
  min-height: 100vh;
  padding: 28px;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  background: #f4f6fb;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(4, 20, 60, 0.35);
  min-height: calc(100vh - 56px);
}

/* Sidebar */
.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--line);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 28px;
  color: var(--blue-900);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-900));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.nav-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.nav-item.active {
  background: var(--blue-100);
  color: var(--blue-700);
}

.nav-item.active .dot {
  background: var(--blue-600);
}

.sidebar-footer {
  margin-top: auto;
}

.status-pill {
  font-size: 12px;
  color: var(--muted);
  background: #f4f6fb;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  text-align: center;
}

.status-pill.ok { color: #0f9d58; border-color: #bff0d6; background: #f0fdf6; }
.status-pill.bad { color: #c1121f; border-color: #f3c6c9; background: #fdf1f1; }

/* Main */
.main {
  padding: 26px 30px 34px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0 0 4px;
  font-size: 24px;
}

.sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 520px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-500), var(--blue-600));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  align-items: start;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 20px 22px;
}

.card h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.dropzone {
  border: 1.5px dashed #c9d4ea;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  margin-bottom: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--blue-600);
  background: var(--blue-100);
}

.dz-icon { font-size: 22px; }
.dz-title { font-weight: 600; font-size: 14px; margin-top: 4px; }
.dz-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.file-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  text-align: left;
  font-size: 12.5px;
}

.file-list li {
  background: #f4f6fb;
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 6px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.file-list li span.size { color: var(--muted); white-space: nowrap; }

.submit-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 13px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-900));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-top: 4px;
}

.submit-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.error {
  color: #c1121f;
  font-size: 13px;
  margin: 10px 0 0;
  min-height: 1em;
}

/* Steps / status card */
.steps {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.steps li {
  position: relative;
  padding: 8px 12px 8px 34px;
  border-radius: 10px;
  background: #f7f9fd;
  font-size: 13.5px;
  color: var(--muted);
}

.steps li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d7deeb;
}

.steps li.active {
  background: var(--blue-100);
  color: var(--blue-700);
  font-weight: 600;
}
.steps li.active::before { background: var(--blue-600); }

.steps li.done {
  background: var(--green-100);
  color: #067a55;
  font-weight: 600;
}
.steps li.done::before { background: var(--green-500); }

.quick-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tile {
  border-radius: 14px;
  padding: 12px;
  color: #fff;
}

.tile-label { font-size: 11px; opacity: .85; }
.tile-value { font-size: 15px; font-weight: 700; margin-top: 4px; }

.tile-blue { background: linear-gradient(135deg, #2563eb, #1e3a8a); }
.tile-green { background: linear-gradient(135deg, #10b981, #047857); }
.tile-purple { background: linear-gradient(135deg, #8b7bf7, #5b3fd6); }

/* Report */
.report-card {
  margin-top: 20px;
}

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

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

.btn-secondary, .btn-primary {
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.btn-primary {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: #fff;
}

#reportFrame {
  width: 100%;
  height: 900px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; align-items: center; }
  .nav { flex-direction: row; }
  .grid { grid-template-columns: 1fr; }
}
