/* APX FINGER PRINT — login polish (wrapper only; does not change login logic) */
:root {
  --apx-navy: #102443;
  --apx-navy2: #0b1e36;
  --apx-gold: #b7892d;
  --apx-gold2: #e7c56b;
  --apx-ink: #172f4b;
  --apx-muted: #6c8098;
  --apx-line: #dce7f2;
  --apx-light: #f4f7fb;
  --apx-card-w: 440px;
}

/* Let the page scroll if the keyboard or extras need it; the app still uses its own ScrollView */
html, body {
  background: var(--apx-navy2);
}
#root {
  min-height: 100%;
}

/* Inputs: clear focus ring */
#root input:focus,
#root textarea:focus {
  outline: 2px solid var(--apx-gold) !important;
  outline-offset: 1px;
  border-color: #1769cf !important;
  box-shadow: 0 0 0 4px rgba(183, 137, 45, 0.18);
}

#root input {
  transition: border-color .15s ease, box-shadow .15s ease;
}

/* Hide a common 1px / empty gutter artifact at the card edge */
.apx-login-card {
  max-width: var(--apx-card-w) !important;
  width: calc(100% - 40px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  align-self: center !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-radius: 20px !important;
  box-shadow: 0 18px 48px rgba(16, 36, 67, 0.22), 0 2px 0 rgba(183, 137, 45, 0.18) !important;
  border: 1px solid #e4eef7 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  padding: 22px 22px 18px !important;
}

.apx-login-footer {
  max-width: var(--apx-card-w) !important;
  width: calc(100% - 40px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  box-sizing: border-box !important;
}

.apx-login-secure {
  max-width: var(--apx-card-w) !important;
  width: calc(100% - 40px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  justify-content: center !important;
}

.apx-remember-row {
  background: var(--apx-light) !important;
  border: 1px solid var(--apx-line) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  gap: 12px !important;
  align-items: center !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
}

.apx-remember-box {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  border-radius: 6px !important;
  border-width: 2px !important;
  flex-shrink: 0 !important;
}

.apx-signin-btn {
  background: #102443 !important;
  background-image: none !important;
  background-color: #102443 !important;
  border-radius: 14px !important;
  min-height: 52px !important;
  box-shadow: 0 10px 22px rgba(16, 36, 67, 0.28) !important;
  border: 1px solid #1b3a68 !important;
  position: relative !important;
}
.apx-signin-btn::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, #b7892d, #e7c56b, #b7892d);
  pointer-events: none;
}
/* Only flatten the gradient fill of THIS button, never a parent / the card */
.apx-signin-btn.apx-signin-inner,
.apx-signin-btn > .apx-signin-inner {
  background: #102443 !important;
  background-image: none !important;
  border-radius: 14px !important;
}
.apx-signin-btn.apx-btn-disabled {
  box-shadow: none !important;
  opacity: 0.78 !important;
  background-color: #1a355c !important;
}

.apx-login-hero {
  padding-top: 28px !important;
  padding-bottom: 40px !important;
}
.apx-login-hero img {
  width: 96px !important;
  height: 96px !important;
}
@media (max-width: 640px) {
  .apx-login-hero {
    padding-top: 22px !important;
    padding-bottom: 36px !important;
  }
  .apx-login-hero img {
    width: 88px !important;
    height: 88px !important;
  }
}
@media (min-width: 900px) {
  .apx-login-hero {
    padding-top: 36px !important;
    padding-bottom: 48px !important;
  }
}

/* Install / PWA / APK button — distinct from Worker #apx-fp-download (teal) */
#apx-install-wrap {
  width: 100%;
  margin-top: 12px;
  margin-bottom: 2px;
  font-family: Cairo, "Segoe UI", Tahoma, Arial, sans-serif;
  box-sizing: border-box;
  text-align: center;
}
#apx-install-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1.5px solid #c9a34a;
  background: #102443;
  color: #f8ecc8;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(16, 36, 67, 0.2);
  font-family: inherit;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}
#apx-install-app:hover { filter: brightness(1.08); }
#apx-install-app:focus-visible {
  outline: 2px solid #e7c56b;
  outline-offset: 2px;
}
#apx-install-app .apx-inst-en { display: none; }
#apx-install-app .apx-inst-ar { display: inline; }
#apx-install-wrap[data-lang="en"] #apx-install-app .apx-inst-en { display: inline; }
#apx-install-wrap[data-lang="en"] #apx-install-app .apx-inst-ar { display: none; }
#apx-install-wrap[data-lang="en"] #apx-install-hint .apx-inst-en { display: block; }
#apx-install-wrap[data-lang="en"] #apx-install-hint .apx-inst-ar { display: none; }

#apx-install-meta {
  margin-top: 6px;
  font-size: 12px;
  color: #6c8098;
  font-weight: 700;
  direction: ltr;
  unicode-bidi: isolate;
}
#apx-install-hint {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f4f7fb;
  border: 1px solid #dce7f2;
  color: #172f4b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  text-align: start;
}
#apx-install-hint .apx-inst-en { display: none; }
#apx-install-hint[hidden] { display: none !important; }

/* When our install button already handles the APK, don't show a second Worker button */
#apx-install-wrap.apx-handles-apk ~ #apx-fp-download,
.apx-login-card #apx-fp-download.apx-hidden-dup {
  display: none !important;
}

/* Mobile: make the install control prominent */
@media (max-width: 640px) {
  #apx-install-app {
    min-height: 52px;
    font-size: 16px;
    box-shadow: 0 10px 24px rgba(16, 36, 67, 0.32);
  }
}

/* Room under the form for extras / Worker widget */
.apx-login-scroll {
  padding-bottom: 36px !important;
}
