/* ===== ISSUE DEBIT CARD PAGE ===== */
.issue-page {
  padding: 28px 40px 80px;
  max-width: 1100px;
}

.page-header {
  margin-bottom: 28px;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  color: #f0f6fc;
}

.issue-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .issue-page { padding: 24px 20px 60px; }
}
@media (max-width: 600px) {
  .issue-page { padding: 20px 16px 60px; }
}
@media (max-width: 900px) {
  .issue-grid { grid-template-columns: 1fr; }
}

/* Form Panels */
.form-panel,
.preview-panel,
.requirements-panel,
.fee-panel {
  background: #111827;
  border: 1px solid rgba(240,246,252,.06);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}

.panel-title {
  font-size: 15px;
  font-weight: 600;
  color: #f0f6fc;
  margin-bottom: 18px;
}

/* Card Type Selection */
.card-type-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-type-option {
  cursor: pointer;
}
.card-type-option input { display: none; }

.card-type-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(240,246,252,.08);
  border-radius: 10px;
  transition: all .2s;
}

.card-type-option.selected .card-type-inner {
  border-color: #5cb8e6;
  background: rgba(92,184,230,.06);
}

.card-type-option:hover .card-type-inner {
  border-color: rgba(92,184,230,.4);
}

.card-type-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(240,246,252,.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5cb8e6;
  flex-shrink: 0;
}

.card-type-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-type-name {
  font-size: 14px;
  font-weight: 600;
  color: #f0f6fc;
}

.card-type-desc {
  font-size: 12px;
  color: #8b949e;
}

.card-type-price {
  font-size: 15px;
  font-weight: 600;
  color: #5cb8e6;
}

/* Form Fields */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  color: #8b949e;
  margin-bottom: 6px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 11px 14px;
  background: rgba(240,246,252,.04);
  border: 1px solid rgba(240,246,252,.08);
  border-radius: 8px;
  color: #f0f6fc;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}

.form-input:focus,
.form-select:focus {
  border-color: #5cb8e6;
}

.form-select {
  color-scheme: dark;
}

.form-select option {
  background: #1a1f2e;
  color: #f0f6fc;
}

.form-input + .form-input,
.form-input + .form-row {
  margin-top: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.form-select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Terms */
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #8b949e;
  cursor: pointer;
  margin-bottom: 18px;
}
.terms-check input {
  margin-top: 2px;
  accent-color: #5cb8e6;
}
.terms-check a {
  color: #5cb8e6;
  text-decoration: none;
}
.terms-check a:hover {
  text-decoration: underline;
}

.apply-btn {
  width: 100%;
  padding: 14px;
  background: #5cb8e6;
  color: #0a0e17;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.apply-btn:hover {
  background: #7ccbf0;
}

/* Card Preview (mini) */
.debit-card.mini {
  width: 100%;
  max-width: 320px;
  height: 195px;
  margin: 0 auto;
}

.debit-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.4), 0 0 0 1px rgba(92,184,230,.12);
}

.debit-card-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #111827 0%, #1a2332 40%, #0f1923 100%);
}
.debit-card-bg::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92,184,230,.1) 0%, transparent 70%);
}

.debit-card-content {
  position: relative;
  z-index: 1;
  padding: 20px 22px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.debit-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.debit-card-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5cb8e6;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
}

.debit-card-type {
  font-size: 10px;
  color: rgba(240,246,252,.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(240,246,252,.15);
  padding: 2px 8px;
  border-radius: 20px;
}

.debit-card-number {
  font-size: 17px;
  font-weight: 500;
  color: #f0f6fc;
  letter-spacing: 3px;
  font-family: 'Courier New', monospace;
}

.debit-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.debit-card-holder {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.debit-card-label {
  font-size: 8px;
  text-transform: uppercase;
  color: rgba(240,246,252,.4);
  letter-spacing: 1px;
}

.debit-card-name {
  font-size: 12px;
  font-weight: 500;
  color: #f0f6fc;
  letter-spacing: 1px;
}

/* KYC Required Banner */
.kyc-required-banner {
  max-width: 600px;
  margin: 0 auto;
}
.kyc-required-content {
  text-align: center;
  padding: 24px 16px;
}
.kyc-required-icon {
  margin-bottom: 16px;
}

/* Panel Subtitle */
.panel-subtitle {
  font-size: 12px;
  color: #6e7681;
  margin: -10px 0 16px;
}

/* Panel Title Row */
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

/* KYC Verified Badge */
.kyc-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #3fb950;
  background: rgba(63,185,80,.08);
  border: 1px solid rgba(63,185,80,.2);
  border-radius: 20px;
  padding: 3px 10px;
}

/* KYC Details Grid */
.kyc-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) {
  .kyc-details-grid { grid-template-columns: 1fr; }
}
.kyc-detail-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  background: rgba(240,246,252,.03);
  border: 1px solid rgba(240,246,252,.06);
  border-radius: 8px;
}
.kyc-detail-label {
  font-size: 11px;
  color: #6e7681;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kyc-detail-value {
  font-size: 14px;
  color: #f0f6fc;
  font-weight: 500;
}

/* Balance Info/Warning */
.balance-info,
.balance-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 10px;
}
.balance-info {
  color: #5cb8e6;
  background: rgba(92,184,230,.06);
  border: 1px solid rgba(92,184,230,.15);
}
.balance-warning {
  color: #e0a050;
  background: rgba(224,160,80,.06);
  border: 1px solid rgba(224,160,80,.15);
}

/* Terms Scroll */
.terms-scroll {
  max-height: 240px;
  overflow-y: auto;
  padding: 16px;
  background: rgba(240,246,252,.02);
  border: 1px solid rgba(240,246,252,.06);
  border-radius: 8px;
  font-size: 12px;
  color: #8b949e;
  line-height: 1.7;
}
.terms-scroll::-webkit-scrollbar { width: 6px; }
.terms-scroll::-webkit-scrollbar-track { background: transparent; }
.terms-scroll::-webkit-scrollbar-thumb { background: rgba(240,246,252,.1); border-radius: 3px; }
.terms-heading {
  font-size: 13px;
  color: #c9d1d9;
  margin: 16px 0 8px;
  font-weight: 600;
}
.terms-heading:first-child { margin-top: 0; }
.terms-scroll p {
  margin: 0 0 12px;
}

/* Spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(240,246,252,.1);
  border-top-color: #5cb8e6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Requirements */
.req-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.req-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #8b949e;
}
.req-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.req-icon.req-loading {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(240,246,252,.1);
  border-top-color: #5cb8e6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.req-item.met {
  color: #3fb950;
}
.req-item.unmet {
  color: #f85149;
}

/* Disabled Apply Button */
.apply-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Fee Summary */
.fee-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
  color: #8b949e;
  border-bottom: 1px solid rgba(240,246,252,.04);
}
.fee-row:last-child {
  border-bottom: none;
}
.fee-row.total {
  color: #f0f6fc;
  font-weight: 600;
  font-size: 15px;
  border-top: 1px solid rgba(240,246,252,.08);
  margin-top: 4px;
  padding-top: 14px;
}

/* Form Hints */
.form-hint {
  display: block;
  font-size: 11px;
  color: #6a7681;
  margin-top: 4px;
}
/* Bug #395: emphasis for conditional-requirement hints (e.g. Middle Name "required
   if it appears on your ID"). Reuses the amber accent already used for required
   markers so the cue is consistent and themeable (no inline color). */
.form-hint .hint-strong {
  color: #e0a050;
  font-weight: 600;
}
.form-required {
  color: #e0a050;
}

/* Validation error styles */
.input-error {
  border-color: #f85149 !important;
  box-shadow: 0 0 0 1px rgba(248,81,73,0.3);
}
.form-error-banner {
  background: rgba(248,81,73,0.1);
  border: 1px solid rgba(248,81,73,0.3);
  color: #fca5a5;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.form-error-msg {
  color: #f85149;
  font-size: 13px;
  margin-top: 8px;
}

/* Signature Pad */
.signature-pad-container {
  position: relative;
  background: rgba(240,246,252,.03);
  border: 1px solid rgba(240,246,252,.1);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 12px;
}
.signature-canvas {
  display: block;
  width: 100%;
  height: 180px;
  border-radius: 8px;
  cursor: crosshair;
  touch-action: none;
}
.signature-line {
  position: absolute;
  bottom: 40px;
  left: 32px;
  right: 32px;
  height: 1px;
  background: rgba(240,246,252,.15);
  pointer-events: none;
}
.signature-actions {
  display: flex;
  gap: 10px;
}
.signature-btn {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}
.signature-btn:hover { opacity: 0.85; }
.signature-btn.clear-btn {
  background: rgba(240,246,252,.06);
  color: #8b949e;
  border: 1px solid rgba(240,246,252,.08);
}
.signature-btn.confirm-btn {
  background: linear-gradient(135deg, #5cb8e6, #4a9fd4);
  color: #fff;
}
.signature-btn.confirm-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.signature-confirmed {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3fb950;
  font-size: 13px;
  font-weight: 500;
  margin-top: 10px;
}

/* Bug #354 — paper preview look for Step 6 only. Black ink on white
   pad so the user sees what JDB will see on the printed application. */
#wizStep6 .signature-pad-container {
  background: #ffffff;
  border-color: rgba(0,0,0,.12);
}
#wizStep6 .signature-canvas {
  background: #ffffff;
}
#wizStep6 .signature-line {
  background: rgba(0,0,0,.2);
}

/* ===== Bug #353 — Review Agreement modal (Step 6) ===== */
.agreement-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  background: rgba(92,184,230,.06);
  border: 1px solid rgba(92,184,230,.2);
  border-radius: 8px;
  font-size: 13px;
  color: #c0c8d4;
}
.agreement-prompt-link {
  display: inline-block;
  padding: 6px 14px;
  background: #5cb8e6;
  color: #0a0a14;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s;
}
.agreement-prompt-link:hover {
  opacity: 0.88;
}
.review-agreement-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100001;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
}
.review-agreement-modal-overlay.is-open {
  display: flex;
}
.review-agreement-modal-dialog {
  background: #ffffff;
  color: #1c1f24;
  border-radius: 12px;
  max-width: 760px;
  width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
}
.review-agreement-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.review-agreement-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0a0a14;
  letter-spacing: 0.3px;
}
.review-agreement-modal-close {
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: #555;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.review-agreement-modal-close:hover { background: rgba(0,0,0,.06); }
.review-agreement-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 28px;
  font-size: 14px;
  line-height: 1.6;
  color: #1c1f24;
}
.review-agreement-modal-body .review-agreement-section {
  margin: 0 0 22px;
}
.review-agreement-modal-body .review-agreement-section:last-child {
  margin-bottom: 0;
}
.review-agreement-modal-body h4 {
  font-size: 14px;
  font-weight: 700;
  color: #0a0a14;
  margin: 0 0 8px;
  letter-spacing: 0.2px;
}
.review-agreement-modal-body p {
  margin: 0 0 10px;
}
.review-agreement-data-box {
  background: #f4f6f8;
  border: 1px solid #e1e6eb;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 8px 0 12px;
  font-size: 13px;
}
.review-agreement-data-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}
.review-agreement-data-row + .review-agreement-data-row {
  border-top: 1px dashed rgba(0,0,0,.08);
}
.review-agreement-data-label {
  color: #555;
  flex: 0 0 40%;
}
.review-agreement-data-value {
  color: #0a0a14;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}
.review-agreement-doc-footer {
  margin-top: 16px;
  font-size: 12px;
  color: #6a737d;
  text-align: center;
}
.review-agreement-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid rgba(0,0,0,.08);
  background: #f8f9fb;
  flex-wrap: wrap;
}
.review-agreement-modal-footer-note {
  margin: 0;
  font-size: 12px;
  color: #555;
  flex: 1 1 60%;
}
.review-agreement-modal-btn {
  padding: 10px 22px;
  background: #5cb8e6;
  color: #0a0a14;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.review-agreement-modal-btn:hover { opacity: 0.92; }
@media (max-width: 600px) {
  .review-agreement-modal-overlay { padding: 12px; }
  .review-agreement-modal-dialog { max-height: 92vh; }
  .review-agreement-modal-body { padding: 20px 20px; font-size: 13px; }
  .review-agreement-modal-footer { padding: 12px 16px; }
  .review-agreement-modal-footer-note { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .review-agreement-modal-overlay { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ===== WIZARD PAGE ===== */
.wizard-page {
  max-width: 900px;
  margin: 0 auto;
}

.page-subtitle {
  font-size: 14px;
  color: #8b949e;
  margin: 4px 0 0;
  line-height: 1.5;
}

/* Wizard Progress Steps */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  gap: 0;
  flex-wrap: wrap;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.wizard-step .step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #8a94a6;
  transition: all 0.2s;
}

.wizard-step.active .step-circle {
  background: #5cb8e6;
  border-color: #5cb8e6;
  color: #0a0e17;
}

.wizard-step.completed .step-circle {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.wizard-step .step-label {
  font-size: 11px;
  color: #8a94a6;
  white-space: nowrap;
}

.wizard-step.active .step-label {
  color: #5cb8e6;
  font-weight: 600;
}

.wizard-step.completed .step-label {
  color: #22c55e;
}

.wizard-steps .step-connector {
  width: 36px;
  height: 2px;
  background: #374151;
  margin: 0 4px;
  margin-bottom: 24px;
  transition: background 0.2s;
}

.wizard-steps .step-connector.filled {
  background: #22c55e;
}

/* Wizard step content container */
.wizard-step-content {
  animation: wizFadeIn 0.3s ease;
}

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

/* Review section in Step 7 */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.review-section {
  background: rgba(240,246,252,.03);
  border: 1px solid rgba(240,246,252,.06);
  border-radius: 10px;
  padding: 18px;
}

.review-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #5cb8e6;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Step 5 issue-grid inside wizard */
.wizard-step-content .issue-grid {
  max-width: none;
}

/* Responsive for wizard */
@media (max-width: 700px) {
  .wizard-steps .step-connector { width: 16px; }
  .wizard-step .step-label { font-size: 9px; }
  .wizard-step .step-circle { width: 30px; height: 30px; font-size: 12px; }
  .review-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .wizard-steps .step-connector { width: 8px; margin: 0 2px; }
  .wizard-step .step-label { display: none; }
  .wizard-steps .step-connector { margin-bottom: 8px; }
}
