:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --text: #111827;
  --text-soft: #4b5563;
  --muted: #6b7280;
  --muted-light: #9ca3af;
  --border: #e5e7eb;
  --border-soft: #eef0f3;
  --primary: #111827;
  --primary-hover: #030712;
  --success: #16a34a;
  --success-hover: #15803d;
  --danger-dark: #991b1b;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --info-soft: #eff6ff;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

input,
select,
textarea {
  font-size: 16px !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(17, 24, 39, 0.08), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.app-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.app-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand h1 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.brand h1 a,
.brand h1 a:hover {
  color: inherit;
  text-decoration: none;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.info {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.green-importsys {
  color: var(--success);
}

.search-panel {
  padding: 18px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-soft);
}

.field label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 7px;
  font-weight: 800;
}

.field input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: var(--muted-light);
  font-weight: 500;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.08);
}

.required-field {
  margin-top: 4px;
  font-size: 12px;
  margin-left: 5px;
  color: var(--danger);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 0 18px;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
}

.content-header {
  padding: 18px 24px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.content-header h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.content-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.manifest-list {
  padding: 8px 14px 18px;
  display: grid;
  gap: 4px;
}

.manifest-list:empty {
  display: none;
}

.manifest-row {
  display: grid;
  grid-template-columns: 126px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 10px 14px 14px;
  margin: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  box-shadow: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.manifest-row:hover {
  background: #f9fafb;
}

.mic-number {
  font-size: 18px;
  letter-spacing: -0.05em;
  color: var(--text);
  line-height: 1.05;
}

.mic-number span {
  display: block;
  font-size: 11px;
  color: var(--muted-light);
  letter-spacing: 0;
  margin-top: 4px;
  font-weight: 800;
}

.manifest-info {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.35;
}

.manifest-info span {
  white-space: nowrap;
}

.manifest-info b {
  color: var(--text);
  font-weight: 900;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-official {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--success);
  color: #ffffff;
  font-weight: 900;
  padding: 0 18px;
  min-width: 132px;
}

.btn-official:hover,
.btn-official:focus {
  background: var(--success-hover);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.20);
}

.btn-official:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.result-message {
  margin: 8px 10px;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: #f9fafb;
  color: var(--text);
  text-align: center;
}

.result-message h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.4;
}

.result-message--error {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger-dark);
}

.result-message--success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.result-message--loading {
  background: var(--info-soft);
  border-color: #bfdbfe;
  color: #1e3a8a;
}

.result-message .btn {
  margin-top: 14px;
}

.footer-note {
  margin: 14px 24px 22px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .page {
    width: min(100% - 20px, 1120px);
    padding-top: 12px;
  }

  .app-shell {
    border-radius: 22px;
  }

  .app-header,
  .content-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-panel {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .btn,
  .btn-official {
    width: 100%;
  }

  .manifest-list {
    padding: 6px 10px 14px;
  }

  .manifest-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border-soft);
  }

  .manifest-row+.manifest-row {
    margin-top: 8px;
  }

  .manifest-info span {
    white-space: normal;
  }

  .row-actions {
    flex-direction: column;
    align-items: stretch;
  }

  button,
  .btn,
  .btn-official {
    font-size: 18px;
    font-weight: 800;
  }
}