.ba-install-body { min-height: 100vh; padding: 20px; background: radial-gradient(circle at top left, #eaf3ff, transparent 38%), linear-gradient(145deg, #f8fbff, #eef5ff); }
.install-page, .start-page { min-height: calc(100vh - 40px); display: grid; place-items: center; }
.install-card { width: min(100%, 1000px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); overflow: hidden; border: 1px solid #d9e5f4; border-radius: 30px; background: #fff; box-shadow: 0 30px 90px rgb(20 52 96 / 16%); }
.install-left, .install-right { padding: clamp(24px, 5vw, 48px); }
.install-left { background: linear-gradient(155deg, #ffffff, #f2f7ff); }
.install-right { display: grid; align-content: center; gap: 18px; background: #f8fbff; border-left: 1px solid #e0e9f5; }
.brand-block { display: flex; gap: 16px; }
.brand-icon { width: 58px; height: 58px; flex: 0 0 58px; display: grid; place-items: center; border-radius: 18px; color: #fff; background: linear-gradient(145deg, #2388ff, #075ff0); box-shadow: 0 12px 28px rgb(7 95 240 / 25%); }
.brand-icon svg { width: 32px; height: 32px; }
.brand-kicker { display: block; color: var(--ba-primary); font-size: .75rem; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.brand-block h1 { margin-top: 6px; font-size: clamp(2rem, 6vw, 3.4rem); }
.brand-block p { max-width: 600px; font-size: 1rem; }
.value-list { display: grid; gap: 11px; margin-top: 28px; }
.value-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 11px; padding: 13px; border: 1px solid #dfe8f4; border-radius: 16px; background: rgb(255 255 255 / 80%); }
.value-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: #eaf2ff; }
.value-item strong, .value-item small { display: block; }
.value-item small { margin-top: 3px; color: var(--ba-text-soft); }
.desktop-note { margin-top: 20px; padding: 14px; border-radius: 16px; color: #fff; background: linear-gradient(145deg, #075ff0, #0349bd); }
.desktop-note strong, .desktop-note span { display: block; }
.desktop-note span { margin-top: 3px; color: rgb(255 255 255 / 80%); }
.qr-card { text-align: center; }
.qr-label { margin-bottom: 10px; color: var(--ba-primary); font-weight: 900; }
.qr-frame { width: min(100%, 250px); aspect-ratio: 1; margin: auto; padding: 12px; border: 1px solid #d8e5f4; border-radius: 22px; background: #fff; box-shadow: var(--ba-shadow-md); }
.qr-frame img { width: 100%; height: 100%; object-fit: contain; }
.qr-card p { margin-top: 12px; font-size: .82rem; }
.install-actions { display: grid; gap: 9px; }
.btn-primary, .btn-secondary, .btn-whatsapp, .link-muted { min-height: 46px; display: flex; align-items: center; justify-content: center; padding: 10px 14px; border: 0; border-radius: 13px; font-weight: 850; cursor: pointer; }
.btn-primary { color: #fff; background: var(--ba-primary); }
.btn-secondary { color: var(--ba-primary); background: var(--ba-primary-soft); }
.btn-whatsapp { color: #fff; background: #1fa95b; }
.link-muted { min-height: 36px; color: var(--ba-text-soft); }
.install-hint { display: none; padding: 12px; border-radius: 12px; background: var(--ba-primary-soft); color: var(--ba-primary-strong); font-size: .8rem; }
.install-hint.is-visible { display: block; }
.start-card { width: min(100%, 480px); padding: 34px; border: 1px solid #d9e5f4; border-radius: 26px; background: #fff; box-shadow: var(--ba-shadow-lg); text-align: center; }
.loader-ring { width: 54px; height: 54px; margin: 0 auto 18px; border: 5px solid #deebff; border-top-color: var(--ba-primary); border-radius: 50%; animation: ba-spin .8s linear infinite; }
.start-card .btn-secondary { margin-top: 18px; }
@keyframes ba-spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .ba-install-body { padding: 0; }
  .install-page, .start-page { min-height: 100vh; }
  .install-card { min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .install-right { border-left: 0; border-top: 1px solid #e0e9f5; }
  .brand-block { align-items: flex-start; }
}

/* Popup propriu pentru instalarea pe iPhone/iPad. */
body.ios-install-open {
  overflow: hidden;
}

body.android-install-open { overflow: hidden; }
.android-install-modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: flex-end; justify-content: center; padding: 12px; }
.android-install-modal.is-open { display: flex; }
.android-install-modal__backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgb(0 0 0 / 62%); }
.android-install-modal__panel { position: relative; width: min(100%, 480px); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); border: 1px solid var(--ba-border, #d9e5f4); border-radius: 22px; background: var(--ba-surface, #fff); color: var(--ba-text, #14233d); box-shadow: 0 24px 70px rgb(0 0 0 / 28%); }
.android-install-modal__drag { display: block; width: 42px; height: 4px; margin: 0 auto 10px; border-radius: 999px; background: var(--ba-border, #cbd7e7); }
.android-install-modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.android-install-modal__header h2 { margin: 2px 0 0; font-size: 1.15rem; }
.android-install-modal__close { width: 36px; height: 36px; flex: 0 0 36px; border: 0; border-radius: 50%; background: var(--ba-surface-soft, #eef4fb); color: inherit; font-size: 1.5rem; line-height: 1; }
.android-install-modal__panel > p { margin: 12px 0; color: var(--ba-text-soft, #52647d); font-size: .86rem; line-height: 1.45; }
.android-install-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.android-install-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 9px; align-items: start; padding: 9px; border-radius: 12px; background: var(--ba-surface-soft, #f3f7fc); }
.android-install-steps li > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--ba-primary, #1769e0); color: #fff; font-weight: 800; }
.android-install-steps strong, .android-install-steps small { display: block; }
.android-install-steps small { margin-top: 2px; color: var(--ba-text-soft, #52647d); font-size: .75rem; }
.android-install-modal__actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 14px; }
.android-install-modal__actions .btn-primary { display: grid; place-items: center; text-decoration: none; }

.ios-install-modal {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  align-items: end;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.ios-install-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.ios-install-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(6 16 31 / 62%);
  backdrop-filter: blur(5px);
}

.ios-install-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 540px);
  max-height: 92vh;
  overflow: auto;
  display: grid;
  gap: 12px;
  margin: 0 auto;
  padding: 10px 15px calc(17px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: #fff;
  box-shadow: 0 -22px 70px rgb(8 24 49 / 28%);
  transform: translateY(28px);
  transition: transform 190ms ease;
}

.ios-install-modal.is-open .ios-install-modal__panel {
  transform: translateY(0);
}

.ios-install-modal__drag {
  width: 46px;
  height: 5px;
  margin: 0 auto;
  border-radius: 999px;
  background: #cfd9e7;
}

.ios-install-modal__header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
}

.ios-install-modal__apple {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: #111;
  font-size: 1.35rem;
  font-weight: 900;
}

.ios-install-modal__header h2 {
  margin: 3px 0 0;
  font-size: 1rem;
  line-height: 1.12;
}

.ios-install-modal__close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  background: #fff;
  color: #52637b;
}

.ios-install-modal__close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.ios-install-modal__intro {
  margin: 0;
  padding: 9px 11px;
  border-radius: 11px;
  color: #24446e;
  background: #edf4ff;
  font-size: .76rem;
  font-weight: 750;
  line-height: 1.35;
}

.ios-install-steps {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ios-install-steps li {
  min-height: 53px;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid #dfe8f4;
  border-radius: 12px;
  background: #fbfdff;
}

.ios-install-steps li > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: #075ff0;
  font-size: .74rem;
  font-weight: 950;
}

.ios-install-steps strong,
.ios-install-steps small {
  display: block;
}

.ios-install-steps strong {
  font-size: .76rem;
}

.ios-install-steps small {
  margin-top: 2px;
  color: #65758c;
  font-size: .65rem;
  line-height: 1.28;
}

.ios-share-symbol {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  border-radius: 7px;
  color: #075ff0;
  background: #eaf2ff;
}

.ios-share-symbol svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ios-install-modal__note {
  padding: 9px 10px;
  border: 1px dashed #cad8ea;
  border-radius: 11px;
  color: #5b6d85;
  font-size: .67rem;
  line-height: 1.35;
  text-align: center;
}

.ios-install-modal__done {
  width: 100%;
}

@media (min-width: 620px) {
  .ios-install-modal {
    align-items: center;
    padding: 20px;
  }

  .ios-install-modal__panel {
    border-radius: 24px;
    padding: 18px;
  }

  .ios-install-modal__drag {
    display: none;
  }
}

/* Verificare instalare iOS */
.start-card[hidden] {
  display: none !important;
}

.start-card--ios-install,
.start-card--invalid {
  display: grid;
  gap: 13px;
  text-align: left;
}

.start-card--ios-install h1,
.start-card--invalid h1 {
  margin: 0;
  text-align: center;
}

.start-card--ios-install > .brand-kicker,
.start-card--invalid > .brand-kicker {
  text-align: center;
}

.start-status-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 18px;
}

.start-status-icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.start-status-icon--install {
  color: #075ff0;
  background: #eaf2ff;
}

.start-status-icon--danger {
  color: #c52e3d;
  background: #fff0f2;
}

.brand-kicker--danger {
  color: #c52e3d;
}

.start-lead {
  margin: 0;
  color: #53657d;
  font-size: .82rem;
  line-height: 1.45;
  text-align: center;
}

.install-verify-steps {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.install-verify-steps li {
  min-height: 54px;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid #dfe8f4;
  border-radius: 12px;
  background: #fbfdff;
}

.install-verify-steps li > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: #075ff0;
  font-size: .74rem;
  font-weight: 950;
}

.install-verify-steps strong,
.install-verify-steps small {
  display: block;
}

.install-verify-steps strong {
  font-size: .76rem;
}

.install-verify-steps small {
  margin-top: 2px;
  color: #65758c;
  font-size: .65rem;
  line-height: 1.3;
}

.install-verify-steps--danger li > span {
  background: #c52e3d;
}

.start-info-box,
.detected-problem {
  padding: 10px 11px;
  border-radius: 12px;
  font-size: .7rem;
  line-height: 1.4;
}

.start-info-box {
  border: 1px dashed #bfd0e6;
  color: #4e617a;
  background: #f5f9ff;
  text-align: center;
}

.detected-problem {
  display: grid;
  gap: 2px;
  border: 1px solid #f0c9cf;
  color: #7c2430;
  background: #fff5f6;
}

.detected-problem span {
  font-size: .59rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.detected-problem strong {
  font-size: .76rem;
}

.detected-problem small {
  color: #8d5961;
  font-size: .65rem;
}

.ios-install-check {
  padding: 10px;
  border: 1px solid #cddbf0;
  border-radius: 12px;
  background: #f6f9ff;
}

.ios-install-check > strong {
  display: block;
  margin-bottom: 7px;
  color: #24446e;
  font-size: .74rem;
}

.ios-install-check ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ios-install-check li {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.ios-install-check li > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #169c57;
  font-size: .72rem;
  font-weight: 950;
}

.ios-install-check b,
.ios-install-check small {
  display: block;
}

.ios-install-check b {
  color: #273d5d;
  font-size: .72rem;
}

.ios-install-check small {
  margin-top: 1px;
  color: #65758c;
  font-size: .62rem;
}

.ios-install-modal__actions {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 8px;
}

@media (max-width: 420px) {
  .start-card {
    width: 100%;
    min-height: 100vh;
    align-content: center;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .ios-install-modal__actions {
    grid-template-columns: 1fr;
  }
}


/* Recuperare controlată dacă verificarea dispozitivului nu primește răspuns. */
.start-recovery {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e3ebf5;
}
.start-recovery[hidden] { display: none !important; }
.start-recovery .btn-primary,
.start-recovery .btn-secondary,
.start-recovery .link-muted { width: 100%; }
