*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #1a1a2e;
  background-image: linear-gradient(
      rgba(15, 23, 42, 0.2),
      rgba(15, 23, 42, 0.2)
    ),
    url('https://images.unsplash.com/photo-1578575437130-527eed3abbec?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: #c0cfe0;
  font-size: 0.95rem;
}

form {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hint {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: #777;
  margin-top: 0.15rem;
}

textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  resize: vertical;
  margin-bottom: 1rem;
}

textarea:focus {
  outline: none;
  border-color: #0f3460;
  box-shadow: 0 0 0 2px rgba(15, 52, 96, 0.15);
}

button {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: #0f3460;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

button:hover:not(:disabled) {
  background: #16213e;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error-banner {
  background: #fee;
  color: #c0392b;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.results {
  margin-bottom: 2rem;
}

.summary {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge.valid {
  background: #d4edda;
  color: #155724;
}

.badge.invalid {
  background: #f8d7da;
  color: #721c24;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

thead {
  background: #16213e;
  color: #fff;
}

th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  font-size: 0.9rem;
}

.mono {
  font-family: 'Courier New', Courier, monospace;
}

.status {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status.ok {
  background: #d4edda;
  color: #155724;
}

.status.fail {
  background: #f8d7da;
  color: #721c24;
}

.row-valid {
  background: #fafff9;
}

.row-invalid {
  background: #fff9f9;
}

.detail-ok {
  color: #28a745;
}

.error-list {
  list-style: none;
  padding: 0;
}

.error-list li {
  color: #c0392b;
  font-size: 0.85rem;
}

.error-list li + li {
  margin-top: 0.25rem;
}

.excel-upload {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.excel-upload h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #16213e;
}

.excel-upload > p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
}

.upload-area {
  position: relative;
  margin-bottom: 1rem;
}

.upload-area input[type='file'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  border: 2px dashed #ccc;
  border-radius: 8px;
  background: #fafafa;
  color: #555;
  font-size: 0.95rem;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}

.upload-area:hover .upload-label {
  border-color: #0f3460;
  background: #f0f4fa;
}

.upload-icon {
  font-size: 2rem;
}

.excel-result {
  background: #f0f8f0;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  padding: 0.75rem 1rem;
}

.excel-result p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.badge.total {
  background: #e2e3e5;
  color: #383d41;
}

.api-docs {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.api-docs h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: #16213e;
}

.api-docs p {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: #555;
}

pre {
  background: #1a1a2e;
  color: #e0e0e0;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

pre code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

footer {
  text-align: center;
  color: #a0b0c0;
  font-size: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
