:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171717;
  background: #f3f4f6;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f3f4f6;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.6;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 48px auto;
  display: grid;
  gap: 20px;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.create-card {
  padding: 28px;
}

.heading h1,
.table-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.heading p,
.table-heading p {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.payment-form {
  margin-top: 24px;
}

.payment-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.amount-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.amount-field {
  position: relative;
  flex: 1;
}

.amount-field input {
  width: 100%;
  height: 48px;
  padding: 0 48px 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  outline: none;
  font-size: 17px;
}

.amount-field input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.amount-field span {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: #6b7280;
  font-weight: 600;
}

#create-button {
  min-width: 160px;
  height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: #111827;
  color: #ffffff;
  font-weight: 600;
}

#create-button:hover:not(:disabled) {
  background: #252f3f;
}

.message {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
}

.message.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.message.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.created-payment {
  margin-top: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
}

.created-payment > div {
  min-width: 0;
}

.created-label {
  display: block;
  margin-bottom: 5px;
  color: #6b7280;
  font-size: 12px;
}

.created-payment a {
  display: block;
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

.created-payment a:hover {
  text-decoration: underline;
}

.secondary-button,
.table-button {
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #ffffff;
  color: #111827;
  font-weight: 600;
}

.secondary-button {
  min-height: 40px;
  padding: 0 14px;
}

.table-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.secondary-button:hover:not(:disabled),
.table-button:hover:not(:disabled) {
  background: #f9fafb;
}

.table-card {
  overflow: hidden;
}

.table-heading {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.table-heading h2 {
  font-size: 20px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid #f0f1f3;
  white-space: nowrap;
}

th {
  background: #fafafa;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  font-size: 14px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.amount-cell {
  font-weight: 650;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status.pending {
  background: #fff7ed;
  color: #9a3412;
}

.status.succeeded {
  background: #f0fdf4;
  color: #166534;
}

.status.canceled {
  background: #fef2f2;
  color: #991b1b;
}

.actions-column,
.actions-cell {
  text-align: right;
}

.empty-cell {
  padding: 36px;
  color: #6b7280;
  text-align: center;
}

@media (max-width: 680px) {
  .page {
    width: min(100% - 20px, 1180px);
    margin: 20px auto;
  }

  .create-card {
    padding: 20px;
  }

  .amount-row,
  .created-payment,
  .table-heading {
    align-items: stretch;
    flex-direction: column;
  }

  #create-button {
    width: 100%;
  }

  .table-heading {
    padding: 18px;
  }

  .secondary-button {
    width: 100%;
  }
}
