/* ─── MODAL (d- prefixed to avoid collisions) ─── */

.d-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.d-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.d-modal {
  display: grid;
  grid-template-columns: 320px 1fr;
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', 'Nunito', sans-serif;
}
.d-modal-backdrop.active .d-modal {
  transform: translateY(0) scale(1);
}

/* Left Panel */
.d-modal-left {
  background: linear-gradient(135deg, #0c2578 0%, #1240bb 30%, #1a56db 60%, #3b82f6 100%);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.d-modal-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(0,0,60,0.35) 0%, transparent 50%);
  pointer-events: none;
}

.d-modal-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.d-logo-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.d-logo-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.d-modal-headline {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
}
.d-modal-headline h2 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  font-family: 'Nunito', sans-serif;
}
.d-modal-headline h2 span { color: #fbbf24; }

.d-modal-subtext {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.d-modal-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  position: relative;
  z-index: 1;
  padding: 0;
}
.d-modal-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.d-feature-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(251,191,36,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.d-feature-icon svg {
  width: 13px;
  height: 13px;
  stroke: #fbbf24;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.d-modal-trust {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}
.d-avatar-stack { display: flex; }
.d-avatar-stack span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: 600;
  margin-right: -8px;
}
.d-trust-text { margin-left: 12px; }
.d-stars { display: flex; gap: 2px; margin-bottom: 2px; }
.d-stars svg { width: 13px; height: 13px; fill: #fbbf24; }
.d-trust-label { font-size: 11px; color: rgba(255,255,255,0.8); font-weight: 500; }

/* Right Panel */
.d-modal-right {
  background: #fff;
  padding: 28px 28px 24px;
  overflow-y: auto;
  position: relative;
  max-height: 92vh; /* ← ADD THIS */
}

.d-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.d-modal-title h3 {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 3px;
  font-family: 'Nunito', sans-serif;
}
.d-modal-title p { font-size: 12.5px; color: #64748b; }

.d-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f1f5f9;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  margin-top: 2px;
}
.d-modal-close:hover { background: #e2e8f0; color: #0f172a; }

.d-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.d-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.d-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.d-form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
}
.d-form-group label span { color: #ef4444; }

.d-form-group input,
.d-form-group select,
.d-form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13.5px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  font-family: 'Nunito', sans-serif;
  appearance: none;
  -webkit-appearance: none;
}
.d-form-group input::placeholder,
.d-form-group textarea::placeholder { color: #94a3b8; }
.d-form-group input:focus,
.d-form-group select:focus,
.d-form-group textarea:focus {
  border-color: #1a56db;
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
  background: #fff;
}

.d-select-wrap { position: relative; }
.d-select-wrap select { padding-right: 32px; color: #94a3b8; }
.d-select-wrap select.selected { color: #0f172a; }
.d-select-wrap::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #94a3b8;
  pointer-events: none;
}

.d-form-group textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
}

.d-btn-submit {
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, #1240bb 0%, #1a56db 50%, #3b82f6 100%);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.18s, transform 0.18s;
  margin-top: 2px;
  font-family: 'Nunito', sans-serif;
}
.d-btn-submit:hover { opacity: 0.92; transform: translateY(-1px); }
.d-btn-submit:active { transform: translateY(0); }
.d-btn-submit svg {
  width: 16px; height: 16px;
  stroke: #fff; fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.d-form-security {
  text-align: center;
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 4px;
}
.d-form-security svg {
  width: 13px; height: 13px;
  stroke: #94a3b8; fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 680px) {
  .d-modal { grid-template-columns: 1fr; max-height: 95vh; }
  .d-modal-left { padding: 24px 20px 20px;max-height:32vh }
  .d-modal-features { gap: 10px; }
  .d-modal-trust { margin-top: 18px; }
  .d-modal-right { padding: 20px 18px; max-height: 60vh;}
  /* .d-form-row { grid-template-columns: 1fr; } */
  .d-modal-headline h2 { font-size: 22px; }
}