:root {
  font-family: Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #eef2f6 0%, #f8fafc 100%);
  color: #111827;
}

.container {
  max-width: 880px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.05;
}

.entry-panel {
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: #374151;
  font-weight: 600;
}

.field input {
  width: 100%;
  font-size: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #c5d0db;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.fieldset {
  margin: 0;
  border: 1px solid #d8e0e8;
  border-radius: 10px;
  padding: 0.85rem 1rem 1rem;
}

.fieldset legend {
  padding: 0 0.35rem;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.35rem 1rem 0 0;
  font-weight: 500;
}

.actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
}

button {
  font-size: 1rem;
  padding: 0.85rem 1.2rem;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.primary-button {
  min-width: 220px;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
}

.primary-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  border: 0;
  border-radius: 10px;
  background: #e5e7eb;
  color: #111827;
  text-decoration: none;
}

.import-panel,
.queue-panel {
  margin-top: 1rem;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.import-panel h2,
.queue-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.import-help {
  margin: 0.5rem 0 0;
  color: #4b5563;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

.import-actions input[type="file"] {
  max-width: 100%;
}

.queue-count {
  color: #4b5563;
  font-size: 0.95rem;
}

.queue-empty {
  color: #6b7280;
}

.queue-list {
  list-style: decimal;
  margin: 0;
  padding-left: 1.25rem;
}

.queue-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
  border-top: 1px solid #e5e7eb;
}

.queue-item:first-child {
  border-top: 0;
}

.queue-item-copy {
  font-family: 'Courier New', monospace;
  color: #1f2937;
}

.queue-remove {
  flex: 0 0 auto;
  background: #e5e7eb;
  color: #111827;
}

.form-message {
  min-height: 1.25rem;
  margin-top: 10px;
  padding: 0;
  color: #b42318;
  font-size: 0.9rem;
  line-height: 1.4;
}

.form-message.is-visible {
  padding: 0.65rem 0.8rem;
  border: 1px solid #f3c7c2;
  border-radius: 10px;
  background: #fef3f2;
}

@media (max-width: 760px) {
  .field-grid {
    grid-template-columns: 1fr;
  }

  .container {
    margin: 2rem auto;
    padding: 0 1rem;
  }

  .entry-panel {
    padding: 1.25rem;
  }

  .queue-panel {
    padding: 1.25rem;
  }

  .import-panel {
    padding: 1.25rem;
  }

  .primary-button {
    width: 100%;
  }

  .actions > button {
    width: 100%;
  }

  .import-actions {
    align-items: stretch;
  }

  .import-actions > * {
    width: 100%;
  }

  .queue-header,
  .queue-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
