* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: #f0f4f8; color: #1a202c; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
}

.wrap { width: 100%; max-width: 440px; }
.card { background: #fff; border-radius: 16px; box-shadow: 0 4px 32px rgba(0,0,0,0.10); padding: 2rem 1.75rem; }

h1 { font-size: 1.15rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; }
.sub { font-size: 0.85rem; color: #64748b; text-align: center; line-height: 1.7; margin-bottom: 1.5rem; }

form { display: flex; flex-direction: column; gap: 0.375rem; }
label { font-size: 0.8rem; font-weight: 600; color: #475569; margin-top: 0.75rem; }
label:first-of-type { margin-top: 0; }
input {
  font-family: inherit; font-size: 0.95rem; padding: 0.65rem 0.85rem;
  border: 1px solid #cbd5e1; border-radius: 8px; direction: ltr; text-align: left;
}
input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }

button {
  margin-top: 1.25rem; padding: 0.75rem; border: none; border-radius: 8px;
  background: #2563eb; color: #fff; font-family: inherit; font-size: 0.95rem;
  font-weight: 700; cursor: pointer; transition: background 0.15s;
}
button:hover { background: #1d4ed8; }
button:disabled { background: #94a3b8; cursor: not-allowed; }

#result { margin-top: 1.25rem; }
.res-card { border-radius: 10px; padding: 1rem 1.1rem; font-size: 0.85rem; line-height: 1.8; }
.res-valid { background: #dcfce7; border: 1px solid #86efac; color: #166534; }
.res-invalid { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; text-align: center; }
.res-row { display: flex; justify-content: space-between; gap: 1rem; }
.res-row + .res-row { margin-top: 0.25rem; }
.res-row b { font-weight: 700; }
.res-badge { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.5rem; }

@media (max-width: 480px) {
  .card { border-radius: 0; padding: 1.5rem 1.25rem; }
  .wrap { max-width: 100%; }
}
