/* Currency Converter — Calculator PK. Clean, mobile-first, no frameworks. */
:root {
  --blue: #1969bc;
  --blue-dark: #14559b;
  --ink: #1c2430;
  --muted: #5b6675;
  --line: #dfe5ec;
  --bg: #f4f7fa;
  --card: #ffffff;
  --warn-bg: #fff7e0;
  --warn-line: #e8c547;
  --err-bg: #fdecea;
  --err-line: #d64541;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 40px; }
header { text-align: center; margin: 8px 0 18px; }
h1 { font-size: 1.7rem; margin: 0 0 4px; color: var(--blue); }
h2 { font-size: 1.15rem; margin: 0 0 12px; color: var(--ink); }
.tagline { color: var(--muted); margin: 0; }
.urdu { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="number"], select {
  width: 100%;
  font-size: 1.1rem;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 48px;
}
.row { display: flex; gap: 10px; align-items: flex-end; }
.row .field { flex: 1; }
.swap {
  flex: 0 0 auto;
  font-size: 1rem;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3f9;
  color: var(--blue);
  cursor: pointer;
  min-height: 48px;
}
.convert {
  width: 100%;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  min-height: 52px;
}
.convert:active { background: var(--blue-dark); }
.result { text-align: center; margin-top: 18px; }
.result-main { font-size: 1.35rem; }
.rate-line { color: var(--muted); margin-top: 4px; }
.source { color: var(--muted); font-size: .9rem; margin: 16px 0 0; }
.note { color: var(--muted); font-size: .9rem; margin: 10px 0 0; }
.alert {
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid;
}
.alert-warn { background: var(--warn-bg); border-color: var(--warn-line); }
.alert-error { background: var(--err-bg); border-color: var(--err-line); }
.pairs { list-style: none; margin: 0; padding: 0; }
.pairs li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}
.pairs li:last-child { border-bottom: none; }
.pair-code { font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .9rem; }
td:nth-child(2), td:nth-child(3), th:nth-child(2), th:nth-child(3) { text-align: right; }
footer { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 8px; }
@media (max-width: 480px) {
  h1 { font-size: 1.4rem; }
  .row { flex-direction: column; align-items: stretch; }
  .swap { margin-bottom: 0; }
}
