* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f6f9;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 40px 20px;
}

.container {
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 1020px;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

h1 {
  font-size: 24px;
  color: #1a1a1a;
}

.upload-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.buttons-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s;
  text-transform: none;
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.upload-btn {
  background-color: #28a745;
}

.upload-btn:hover {
  background-color: #218838;
}

.address-btn {
  background-color: #fd7e14;
}

.address-btn:hover {
  background-color: #e36a09;
}

.download-btn {
  background-color: #007bff;
}

.download-btn:hover {
  background-color: #0056b3;
}

.clear-btn {
  background-color: #8c959f;
  padding: 6px 12px;
  font-size: 13px;
}

.clear-btn:hover {
  background-color: #6e7781;
}

input[type="file"] {
  display: none;
}

.statuses {
  font-size: 12px;
  color: #666;
}

.grid-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.cell {
  background: #f9fafb;
  border: 1px solid #dce1e7;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

label, .label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 10px;
  text-transform: uppercase;
}

input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 2px solid #007bff;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus {
  border-color: #0056b3;
}

.output {
  font-size: 16px;
  font-weight: 500;
  color: #111;
  background: #eef2f6;
  padding: 10px 12px;
  border-radius: 6px;
  min-height: 43px;
  display: flex;
  align-items: center;
  word-break: break-word;
}

.history-section {
  border-top: 1px solid #e1e4e8;
  padding-top: 24px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.history-header h2 {
  font-size: 18px;
  color: #555;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #f0f2f5;
  color: #596068;
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}

.history-table th,
.history-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #dcdfe4;
}

.history-table th {
  background-color: #e2e5ea;
  color: #444950;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

@media (max-width: 768px) {
  .grid-table {
    grid-template-columns: 1fr;
  }
  .upload-box {
    align-items: flex-start;
  }
  .history-table {
    display: block;
    overflow-x: auto;
  }
}