.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.panel {
  background: var(--surface);
  border-radius: 24px;
  padding: 32px;
  box-shadow:
    0 0 0 1px rgba(21, 22, 26, 0.05),
    0 2px 4px rgba(21, 22, 26, 0.04),
    0 24px 48px -28px rgba(21, 22, 26, 0.28);
}

.login-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
}

.brand-mark.big {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  margin-bottom: 22px;
}

h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.sub {
  margin: 0 0 26px;
  color: var(--muted);
}

label,
.label {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.field {
  display: flex;
  align-items: center;
  height: 54px;
  padding: 0 16px;
  margin-bottom: 20px;
  background: var(--surface-sunk);
  border: 1.5px solid var(--line);
  border-radius: var(--r-field);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.field:focus-within {
  background: #fff;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(21, 22, 26, 0.06);
}

.field.invalid {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-weight: 500;
}

.suffix {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.err {
  min-height: 20px;
  margin: -4px 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
}

.btn.wide {
  width: 100%;
}

/* app shell */
.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 24px 56px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  font-stretch: 118%;
}

.ghost {
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
}

.ghost:hover {
  background: var(--surface);
  border-color: var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* voucher type */
.tabs {
  display: flex;
  gap: 24px;
  margin: 0 0 22px;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  margin-bottom: -1px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}

.tabs button:hover {
  color: var(--ink);
}

.tabs button.on {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* result */
.result {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1.5px dashed var(--line-strong);
  animation: pop 0.45s var(--ease) both;
}

.result[hidden] {
  display: none;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.link-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border-radius: var(--r-field);
  background: var(--accent-soft);
  border: 1px solid #c9e0d6;
}

.link-box a {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.link-box a:hover {
  text-decoration: underline;
}

.copy {
  flex: none;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s;
}

.copy:hover {
  background: #26272d;
}

.copy.done {
  background: var(--accent);
}

/* history */
.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.count {
  font-size: 13px;
  color: var(--muted);
}

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

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.item:first-child {
  border-top: 0;
}

.item .amt {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.item .amt small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-left: 4px;
}

.item .from {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item .meta {
  grid-column: 1;
  font-size: 12px;
  color: var(--muted);
}

.item .meta a {
  color: var(--ink-2);
  text-decoration: none;
}

.item .meta a:hover {
  text-decoration: underline;
}

.actions {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: flex;
  gap: 8px;
}

.icon-btn {
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.icon-btn:hover {
  border-color: var(--ink);
  background: #fff;
}

.icon-btn.danger:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-soft);
}

.empty {
  margin: 8px 0 0;
  padding: 36px 0;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 860px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .shell {
    padding: 14px 14px 40px;
  }

  .panel {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .item {
    grid-template-columns: 1fr;
  }

  .actions {
    grid-column: 1;
    grid-row: auto;
    margin-top: 8px;
  }

  .link-box {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .copy {
    height: 44px;
  }
}
