@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --ink: #152d26;
  --muted: #64756e;
  --paper: #f5f7f2;
  --card: #fff;
  --line: #dce5dc;
  --green: #146b4a;
  --mint: #dff4e8;
  --amber: #fff0d4;
  --border-radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

header {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 20px 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.brandmark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  font: 800 24px 'Manrope', sans-serif;
  flex-shrink: 0;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  font: 800 28px 'Manrope', sans-serif;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

h2 {
  font: 700 20px 'Manrope', sans-serif;
  margin-bottom: 8px;
}

.sub {
  color: var(--muted);
  max-width: 580px;
  line-height: 1.5;
  margin-bottom: 0;
  font-size: 14px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 6px;
}

main {
  max-width: 860px;
  padding: 0 20px 30px;
  margin: auto;
  display: grid;
  gap: 18px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: 0 4px 18px rgba(20, 107, 74, 0.04);
}

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

.status {
  font-size: 11px;
  font-weight: 600;
  background: #f2f3f1;
  color: #6b766f;
  padding: 6px 12px;
  border-radius: 99px;
  white-space: nowrap;
}

.dropzone {
  min-height: 140px;
  border: 2px dashed #b8cbbd;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 20px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  background: #fafbfa;
  transition: border-color 0.2s, background-color 0.2s;
}

.dropzone:hover {
  border-color: var(--green);
  background: #f0f7f3;
}

.dropzone strong {
  color: var(--ink);
  font-size: 15px;
}

.upload-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--mint);
  display: grid;
  place-items: center;
  font-size: 20px;
}

.dropzone input {
  display: none;
}

.primary {
  width: 100%;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  padding: 13px;
  cursor: pointer;
  font-size: 14px;
  transition: opacity 0.2s, transform 0.1s;
}

.primary:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fine {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  margin: 10px 0 0;
}

.preview-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 10px;
  background: #f9fbf9;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.preview-wrap img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.text-button {
  border: 0;
  background: transparent;
  color: #c92a2a;
  font-weight: 600;
  cursor: pointer;
  font-size: 12px;
}

.track {
  height: 8px;
  background: #e9eee9;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 12px;
}

.track div {
  height: 100%;
  width: 0;
  background: var(--green);
  transition: width 0.3s ease;
}

.rule-box {
  margin-top: 14px;
  padding: 16px;
  border-radius: 12px;
  background: var(--mint);
  border: 1px solid #c2e6d3;
  font-size: 13px;
  line-height: 1.5;
}

.rule-box.caution {
  background: var(--amber);
  border: 1px solid #fedfa8;
}

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

.rule-badge {
  background: rgba(20, 107, 74, 0.15);
  color: var(--green);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.rule-date {
  font-size: 10.5px;
  color: #666;
}

.manual-lookup {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.lookup-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.btn-chip {
  border: 1px solid var(--line);
  background: #fafbfa;
  color: var(--ink);
  padding: 7px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-chip:hover {
  background: var(--mint);
  border-color: var(--green);
}

ul {
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

li + li {
  margin-top: 6px;
}

details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

a {
  color: var(--green);
  text-decoration: underline;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  padding: 10px 20px 30px;
}

@media(max-width: 560px) {
  header { padding-top: 22px; }
  .panel { padding: 18px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .status { margin-bottom: 8px; }
  h1 { font-size: 24px; }
}
