:root {
  --sidebar: #1e293b;
  --sidebar-soft: #273449;
  --topbar: #1e293b;
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2f80ed;
  --primary-soft: #e8f1fd;
  --border: #dbe3ef;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --ok-border: #86efac;
  --warn: #ca8a04;
  --error: #b42318;
  --accent: #d4a017;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.topbar {
  grid-column: 1 / -1;
  height: 64px;
  background: var(--topbar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  padding: 0 22px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(145deg, #2f80ed, #1d4ed8);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(212, 160, 23, 0.35);
}

.brand-title {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  color: #f8fafc;
}

.sidebar {
  background: var(--sidebar);
  color: #e2e8f0;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}


.sidebar-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #cbd5e1;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #2f80ed);
  border-radius: 999px;
  transition: width 0.25s ease;
}

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

.process-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.process-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: 3px;
  border: 2px solid #64748b;
  background: transparent;
  flex-shrink: 0;
}

.process-item.not-started .process-dot {
  border-color: #ef4444;
  background: #ef4444;
}

.process-item.in-progress .process-dot {
  border-color: #eab308;
  background: #eab308;
}

.process-item.complete .process-dot {
  border-color: #22c55e;
  background: #22c55e;
}

.process-item.pending .process-dot {
  border-color: #64748b;
  background: transparent;
}

.process-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.process-status {
  margin: 2px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.shield {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.footer-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.footer-sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: #94a3b8;
}

.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.main {
  padding: 28px;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}

.prepare-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 18px;
  margin-bottom: 18px;
  align-items: start;
}

.prepare-copy h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.15;
}

.prepare-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 560px;
}

.before-box {
  background: var(--ok-soft);
  border: 1px solid var(--ok-border);
  border-radius: 14px;
  padding: 16px 18px;
}

.before-title {
  margin: 0 0 10px;
  font-weight: 700;
  color: #166534;
}

.before-box ul {
  margin: 0;
  padding-left: 18px;
  color: #166534;
  line-height: 1.7;
}

.card {
  background: var(--card);
  border: 1px solid #e2e8f3;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  padding: 22px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.card-head h2 {
  margin: 0;
  font-size: 24px;
}

.card-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: #f8fafc;
}

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

.zone-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.zone-num {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.dropzone-label {
  font-weight: 600;
}

.dropzone {
  border: 2px dashed #cfd9e8;
  border-radius: 14px;
  background: #fcfdff;
  min-height: 190px;
  cursor: pointer;
  display: block;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.dragover {
  border-color: var(--primary);
  background: #f5f9ff;
}

.dropzone.has-file {
  border-style: solid;
  border-color: #bbf7d0;
  background: #f8fffb;
}

.dropzone input {
  display: none;
}

.drop-content {
  text-align: center;
  padding: 34px 18px;
}

.upload-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--primary);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-size: 22px;
  font-weight: 700;
}

.drop-title {
  margin: 0;
  font-weight: 600;
}

.drop-link {
  margin: 8px 0 4px;
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}

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

.file-feedback {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.file-feedback[hidden] {
  display: none !important;
}

.success-msg {
  margin: 0;
  color: var(--ok);
  font-size: 13px;
  font-weight: 600;
}

.remove-btn {
  flex-shrink: 0;
  color: #b42318;
}

.remove-btn:hover {
  color: #912018;
}

.output-selector {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #e7edf7;
  border-radius: 12px;
  background: #fbfdff;
}

.selector-title {
  margin: 0;
  font-weight: 700;
}

.radio-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
}

.radio-item input {
  accent-color: var(--primary);
}

.privacy-banner {
  margin-top: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
}

.status-area {
  margin-top: 14px;
  border-top: 1px solid #edf2f8;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-copy {
  min-width: 0;
  flex: 1;
}

#status-text {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

#status-text.warn {
  color: var(--warn);
}

.manual-download {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.link-btn {
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  padding: 8px 4px;
}

.link-btn:hover {
  text-decoration: underline;
}

#submit-btn {
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 700;
  color: white;
  background: var(--primary);
  cursor: pointer;
}

#submit-btn[disabled] {
  background: #c4cfdf;
  cursor: not-allowed;
}

.ok {
  color: var(--ok) !important;
}

.error {
  color: var(--error) !important;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 16px;
  }

  .prepare-row,
  .grid {
    grid-template-columns: 1fr;
  }

  .status-area {
    flex-direction: column;
    align-items: stretch;
  }

  .action-row {
    justify-content: space-between;
  }
}
