/* ── Jahad Keshavarzi enhanced UI ── */

.jk-hero {
  margin: -20px -22px 18px;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
  min-height: 120px;
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 45%, #388e3c 100%);
}

.jk-hero img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  opacity: 0.92;
}

.jk-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 18px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.45) 100%);
  color: #fff;
}

.jk-hero-overlay strong {
  font-size: 15px;
  margin-bottom: 2px;
}

.jk-hero-overlay span {
  font-size: 11px;
  opacity: 0.95;
}

.jk-stepbar {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 0 2px;
}

.jk-stepbar-item {
  flex: 1;
  text-align: center;
  font-size: 9px;
  color: #8a9a8a;
  position: relative;
}

.jk-stepbar-item::before {
  content: '';
  display: block;
  height: 4px;
  border-radius: 999px;
  background: #dce8dc;
  margin-bottom: 6px;
}

.jk-stepbar-item.done::before,
.jk-stepbar-item.active::before {
  background: linear-gradient(90deg, #2e7d32, #1b5e20);
}

.jk-stepbar-item.active {
  color: #1b5e20;
  font-weight: 700;
}

.jk-stepbar-item.done {
  color: #388e3c;
}

.jk-form-card {
  background: #fafcfa;
  border: 1px solid #dce8dc;
  border-radius: 18px;
  padding: 16px 14px;
  margin-bottom: 8px;
}

.jk-form-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8f0e8;
}

.jk-form-card__head svg {
  width: 22px;
  height: 22px;
  color: #1b5e20;
  flex-shrink: 0;
}

.jk-form-card__head span {
  font-size: 14px;
  font-weight: 700;
  color: #1b5e20;
}

.jk-field-row {
  margin-bottom: 14px;
}

.jk-field-row:last-child {
  margin-bottom: 0;
}

.jk-field-row > label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #3d4f3d;
  margin-bottom: 6px;
}

.jk-input-wrap {
  position: relative;
}

.jk-input-wrap input,
.jk-input-wrap select {
  width: 100%;
  height: 50px;
  border: 1.5px solid #c5d4c5;
  border-radius: 14px;
  padding: 0 44px 0 14px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: #222;
  transition: border-color .2s, box-shadow .2s;
}

.jk-input-wrap input:focus,
.jk-input-wrap select:focus {
  outline: none;
  border-color: #2e7d32;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}

.jk-input-wrap .jk-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  opacity: 0.55;
  pointer-events: none;
}

.jk-input-wrap select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 36px;
}

.jk-input-wrap input.jk-input-rtl,
.jk-input-wrap select {
  direction: rtl;
  text-align: right;
}

.jk-birth-readonly {
  cursor: pointer;
  caret-color: transparent;
  direction: rtl;
  text-align: right;
}

.jk-birth-readonly:focus {
  cursor: pointer;
}

/* ── Serial grid (سریال کد ملی) ── */
.jk-serial-field {
  margin-bottom: 16px;
}

.jk-serial-field > label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}

.jk-serial-hint {
  font-size: 11px;
  color: #777;
  margin-bottom: 10px;
  line-height: 1.7;
}

.jk-serial-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  justify-content: center;
  direction: ltr;
  padding: 12px 6px;
  background: #f8fbf8;
  border: 1.5px solid #c5d4c5;
  border-radius: 16px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.jk-serial-grid.jk-field-error {
  border-color: #d32f2f;
  box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.12);
}

.jk-serial-cell {
  flex: 1 1 0;
  min-width: 0;
  max-width: 28px;
  width: 100%;
  height: 40px;
  border: none;
  border-bottom: 2.5px solid #8aab8a;
  background: transparent;
  text-align: center;
  font-size: clamp(16px, 4.2vw, 20px);
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: #1b5e20;
  padding: 0;
  caret-color: #1b5e20;
}

.jk-serial-cell:focus {
  outline: none;
  border-bottom-color: #1b5e20;
  background: rgba(46, 125, 50, 0.06);
  border-radius: 6px 6px 0 0;
}

.jk-serial-cell::placeholder {
  color: #b0c4b0;
  font-weight: 400;
}

.jk-serial-sep {
  flex: 0 0 5px;
  width: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 14px;
  user-select: none;
}

/* ── Birthdate field ── */
.jk-birth-field {
  margin-bottom: 8px;
}

.jk-birth-field > label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}

.jk-birth-wrap {
  position: relative;
}

.jk-birth-wrap input {
  width: 100%;
  height: 50px;
  border: 1.5px solid #c5d4c5;
  border-radius: 14px;
  padding: 0 44px 0 14px;
  font: inherit;
  font-size: 15px;
  letter-spacing: 1px;
  background: #fff;
}

.jk-birth-wrap input:focus {
  outline: none;
  border-color: #2e7d32;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}

.jk-birth-wrap .jk-cal-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  opacity: 0.5;
  pointer-events: none;
}

/* ── Letter enhanced ── */
.jk-letter {
  position: relative;
  overflow: hidden;
}

.jk-letter::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(46,125,50,.08) 0%, transparent 70%);
  pointer-events: none;
}

.jk-letter-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff3e0;
  border: 1px dashed #ffb74d;
  color: #e65100;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 12px;
}

.jk-letter-greeting {
  font-size: 15px !important;
  color: #1b5e20 !important;
}

/* ── Preview dev bar ── */
.jk-preview-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1a1a1a;
  color: #eee;
  padding: 8px 10px;
  font-size: 11px;
}

.jk-preview-bar strong {
  display: block;
  margin-bottom: 6px;
  color: #8bc34a;
}

.jk-preview-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.jk-preview-steps button {
  border: 1px solid #444;
  background: #2a2a2a;
  color: #ddd;
  border-radius: 8px;
  padding: 5px 8px;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.jk-preview-steps button.active {
  background: #1b5e20;
  border-color: #2e7d32;
  color: #fff;
}

.jk-preview-flow {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.jk-preview-flow button {
  flex: 1;
  border: 0;
  border-radius: 8px;
  padding: 7px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  background: #c9a227;
  color: #111;
  font-weight: 700;
}

.jk-preview-modes {
  display: flex;
  gap: 6px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.jk-preview-modes button {
  flex: 1;
  min-width: 140px;
  border: 1px solid #a5d6a7;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  background: #fff;
  color: #1b5e20;
}

.jk-preview-modes button.active {
  background: #1b5e20;
  border-color: #2e7d32;
  color: #fff;
  font-weight: 700;
}

.jk-page-hidden {
  display: none !important;
}

/* ── Home / letter download landing ── */

.jk-home-body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(165deg, #e8f5e9 0%, #f5faf5 38%, #ffffff 100%);
  font-family: Tahoma, Arial, sans-serif;
}

.jk-home {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 28px;
}

.jk-home-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 4px 16px;
}

.jk-home-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 4px 14px rgba(27, 94, 32, 0.12);
}

.jk-home-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.jk-home-header-text strong {
  font-size: 15px;
  color: #1b5e20;
}

.jk-home-header-text span {
  font-size: 11px;
  color: #5f6f5f;
}

.jk-home-hero {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 55%, #43a047 100%);
  color: #fff;
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: 0 12px 32px rgba(27, 94, 32, 0.28);
  margin-bottom: 18px;
}

.jk-home-badge {
  display: inline-block;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 10px;
}

.jk-home-hero h1 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.65;
}

.jk-home-hero p {
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  opacity: 0.95;
}

.jk-home-doc {
  background: #fff;
  border-radius: 18px;
  padding: 18px 16px;
  border: 1px solid #dce8dc;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  margin-bottom: 16px;
}

.jk-home-doc-preview {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.jk-home-doc-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(145deg, #e8f5e9, #c8e6c9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.jk-home-doc-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jk-home-doc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e8efe8;
}

.jk-home-doc-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.jk-home-doc-row span {
  color: #6b7c6b;
}

.jk-home-doc-row strong {
  color: #1a2e1a;
}

.jk-home-status {
  color: #1b5e20 !important;
}

.jk-home-trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #2e4a2e;
}

.jk-home-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.jk-home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  text-decoration: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.jk-home-btn svg {
  width: 22px;
  height: 22px;
}

.jk-home-btn--primary {
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
  color: #fff;
  box-shadow: 0 10px 24px rgba(27, 94, 32, 0.35);
}

.jk-home-btn--primary:active {
  transform: scale(0.98);
}

.jk-home-btn--loading {
  opacity: 0.85;
  pointer-events: none;
}

.jk-home-btn--ghost {
  background: #fff;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.jk-home-link-app {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: #1565c0;
  text-decoration: none;
  padding: 8px;
  font-weight: 600;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.jk-home-note {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.85;
  color: #5d4037;
  margin-bottom: 16px;
}

.jk-home-footer {
  text-align: center;
  font-size: 10px;
  color: #8a9a8a;
  padding-top: 8px;
}

.jk-home-hero--apk h1 {
  font-size: 17px;
}

.jk-home-hero--apk p + p {
  margin-top: 10px;
}

.jk-home-perks {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jk-home-perks li {
  position: relative;
  padding-right: 22px;
  font-size: 12px;
  line-height: 1.75;
  color: #2e4a2e;
}

.jk-home-perks li::before {
  content: "✓";
  position: absolute;
  right: 0;
  top: 0;
  color: #1b5e20;
  font-weight: 700;
  font-size: 13px;
}

.jk-home-alert {
  background: #fff3e0;
  border: 1px solid #ffcc80;
  color: #e65100;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 14px;
}

.jk-home-apk-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.jk-home-apk-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(145deg, #1b5e20, #2e7d32);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.jk-home-apk-icon svg {
  width: 28px;
  height: 28px;
}

.jk-home-apk-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.jk-home-apk-meta > strong {
  font-size: 14px;
  color: #1b5e20;
}

.jk-home-apk-meta > span {
  font-size: 11px;
  color: #6b7c6b;
  margin-bottom: 4px;
}

.jk-home-steps {
  background: #f1f8f1;
  border: 1px solid #c8e6c9;
  border-radius: 16px;
  padding: 14px 14px 10px;
  margin-bottom: 14px;
}

.jk-home-steps-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #1b5e20;
}

.jk-home-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jk-home-steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.75;
  color: #2e4a2e;
}

.jk-home-steps-list li span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1b5e20;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.jk-home-linkbox {
  background: #fff;
  border: 1px solid #dce8dc;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

.jk-home-linkbox label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #1b5e20;
  margin-bottom: 8px;
}

.jk-home-linkrow {
  display: flex;
  gap: 8px;
}

.jk-home-linkrow input {
  flex: 1;
  min-width: 0;
  border: 1px solid #c8e6c9;
  border-radius: 10px;
  padding: 10px;
  font-size: 11px;
  background: #fafcfa;
  color: #1a2e1a;
}

.jk-home-copy {
  border: 0;
  border-radius: 10px;
  padding: 0 14px;
  background: #2e7d32;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.jk-home-linkhint {
  margin: 8px 0 0;
  font-size: 11px;
  color: #6b7c6b;
  line-height: 1.7;
}

.jk-home-linkhint code {
  background: #e8f5e9;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
}

.jk-home-warning {
  background: #ffebee;
  border: 1px solid #ffcdd2;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 12px;
  line-height: 1.9;
  color: #5d4037;
}

.jk-home-warn-red {
  color: #c62828;
}

.jk-home-dl-hint {
  text-align: center;
  margin: 8px 0 0;
  font-size: 11px;
  color: #6b7c6b;
}
