:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --success: #15803d;
  --error: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef3ff 0%, var(--bg) 100%);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.invoice-section {
  width: min(720px, 100%);
  background: var(--panel);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 20px 35px -30px rgba(15, 23, 42, 0.35);
}

h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2.3vw, 2rem);
}

.subtitle {
  margin: 0.5rem 0 1.25rem;
  color: var(--muted);
}

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

.input-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr auto;
}

input[type="text"] {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
}

input[type="text"]:focus {
  outline: 2px solid var(--orange);
  border-color: var(--orange);
}

button {
  border: 2px solid transparent;
  border-radius: var(--radius);
  background-color: var(--orange);
  color: var(--white);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.975rem;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}

button:hover {
  background-color: var(--orange-dark);
  border-color: var(--orange-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.message {
  min-height: 1.2rem;
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.message.error {
  color: var(--error);
}

.message.success {
  color: var(--success);
}

.invoice-card {
  margin-top: 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.1rem;
  background: #fafcff;
}

.invoice-card h2 {
  margin-top: 0;
  margin-bottom: 0.9rem;
  font-size: 1.2rem;
}

.invoice-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 1rem;
  margin: 0 0 1rem;
}

.invoice-grid dt {
  color: var(--muted);
}

.invoice-grid dd {
  margin: 0;
  font-weight: 600;
}

.pay-btn {
  width: 100%;
}

.hidden {
  display: none;
}

.link-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius);
  border: 2px solid var(--navy);
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.975rem;
  background: transparent;
  transition: all var(--transition);
}

.link-btn:hover {
  background: var(--navy);
  color: var(--white);
}

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