* { box-sizing: border-box; }
:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  background: #f0fdf4;
}
body { margin: 0; }
.container { width: min(860px, 92%); margin: 20px auto 40px; }

/* Hero Banner */
.hero {
  background: linear-gradient(135deg, #064e3b, #047857);
  color: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  box-shadow: 0 8px 25px rgba(4, 120, 87, 0.2);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: .06em;
  font-weight: 600;
}
h1 { margin: 8px 0 6px; font-size: clamp(20px, 3.5vw, 30px); font-weight: 800; }
.hero p { margin: 0; color: #d1fae5; font-size: 13.5px; }
.limit {
  white-space: nowrap;
  background: #fff;
  color: #064e3b;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Card Section */
.card {
  background: #fff;
  margin-top: 16px;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(6, 78, 59, 0.04);
  border: 1px solid #d1fae5;
}
h2 {
  margin: 0 0 16px;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #065f46;
  font-weight: 700;
}

/* Form & Inputs */
.form-group { margin-bottom: 12px; }
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: #374151; }
label span { color: #dc2626; }
label small { font-weight: 400; color: #6b7280; }

input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 13.5px;
  outline: none;
  transition: all 0.2s;
}
input:focus, select:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}
input:disabled { background: #f9fafb; cursor: not-allowed; }

/* Buttons */
button {
  border: 0;
  border-radius: 9px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.2s, background 0.2s;
  margin-top: 4px;
}
button:disabled { opacity: .55; cursor: not-allowed; }
.primary { width: 100%; background: #059669; color: #fff; margin-top: 8px; }
.primary:hover:not(:disabled) { background: #047857; }
.secondary { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.secondary:hover:not(:disabled) { background: #d1fae5; }
.danger { background: #fee2e2; color: #991b1b; margin-top: 0; }
.danger:hover:not(:disabled) { background: #fecaca; }

/* File Info & Progress */
.file-info { margin-top: 6px; padding: 8px 10px; background: #f0fdf4; border-radius: 8px; color: #047857; font-size: 12.5px; border: 1px solid #a7f3d0; }
.hidden { display: none !important; }
.progress-wrap { margin-top: 12px; }
.progress { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: #059669; transition: width .2s; }
#progressText { font-size: 12px; color: #4b5563; margin-top: 5px; }

/* Results & Search Grid */
.result { margin-top: 14px; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; background: #f9fafb; font-size: 13px; }
.success { border-color: #a7f3d0; background: #f0fdf4; }
.error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.raw { display: flex; gap: 6px; margin-top: 8px; }
.raw input { flex: 1; font-size: 12px; background: #fff; padding: 8px 10px; }
.raw button { margin: 0; padding: 8px 12px; white-space: nowrap; font-size: 12px; }

.search-grid { display: grid; grid-template-columns: 220px 1fr; gap: 12px; }

/* Items list */
.item { border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 14px; margin-top: 10px; background: #fff; }
.item-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.item h3 { margin: 0 0 4px; font-size: 14.5px; word-break: break-word; color: #111827; }
.meta { font-size: 12.5px; color: #4b5563; line-height: 1.6; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.actions button { margin: 0; padding: 6px 10px; font-size: 12px; }

/* Icons SVG Utility */
.icon-sm { width: 15px; height: 15px; stroke-width: 2.2; flex-shrink: 0; }
.icon-md { width: 18px; height: 18px; stroke-width: 2.2; flex-shrink: 0; color: #059669; }

/* Footer */
footer { display: flex; justify-content: center; gap: 6px; color: #6b7280; font-size: 11.5px; margin-top: 20px; }

/* Responsive Adjustments */
@media(max-width: 650px) {
  .hero { display: block; padding: 18px; }
  .limit { display: inline-flex; margin-top: 12px; }
  .search-grid { grid-template-columns: 1fr; gap: 0; }
  .raw { display: block; }
  .raw button { width: 100%; margin-top: 6px; }
  .container { width: 95%; margin: 12px auto 30px; }
  .card { padding: 14px; }
}
