@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap");

:root {
  --text: #333333;
  --muted: #888888;
  --border: #ced4da;
  --btn-disabled: #c8c8c8;
  --btn-active: #4caf50;
  --btn-active-hover: #357a38;
  --footer-bg: #f8f9fa;
  --code-bg: #e9ecef;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: Cairo, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background-color: #ffffff;
}

.content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  background-color: #ffffff;
}

.header {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  max-width: 420px;
  margin-top: 12px;
  padding: 0 16px;
}

html[dir="rtl"] .header {
  justify-content: flex-end;
}

.modern-select {
  width: 50px;
  max-width: 50px;
  padding: 5px 18px 5px 5px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #333;
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23333' d='M0 0l5 5 5-5H0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px;
  appearance: none;
  outline: none;
  cursor: pointer;
}

html[dir="rtl"] .modern-select {
  padding: 5px 5px 5px 18px;
  background-position: left 8px center;
}

.main {
  position: relative;
  flex: 1 0 auto;
  width: 100%;
  max-width: 420px;
  padding: 8px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main--landing {
  justify-content: center;
  padding-bottom: 80px;
}

.main__form-logo {
  width: 170px;
  height: auto;
  margin: 12px auto 28px;
  display: block;
}

.boxForm {
  width: 100%;
  margin: 0 auto;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.boxForm--landing {
  max-width: 100%;
}

.form-title {
  color: #333;
  font-weight: 700;
  text-align: center;
  text-transform: none;
  margin: 0 0 20px;
  font-size: 1.35rem;
  line-height: 1.45;
}

.form-title--ready {
  font-size: 1.75rem;
  line-height: 1.5;
  margin: 0 0 28px;
  color: #333;
}

.form-title--ready strong {
  color: #333;
  font-weight: 700;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 400;
  text-align: center;
  font-size: 0.95rem;
  color: #333;
}

.input-group {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  direction: ltr;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  color: #333;
  white-space: nowrap;
  background-color: var(--code-bg);
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: 0.375rem 0 0 0.375rem;
}

.form-control {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  color: #333;
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: 0 0.375rem 0.375rem 0;
  outline: none;
}

.form-control::placeholder {
  color: #adb5bd;
}

.form-control:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

.form-control.is-invalid {
  border-color: #dc3545;
}

.error-msg {
  display: none;
  color: #dc3545;
  font-size: 0.8rem;
  margin-top: 0.4rem;
  text-align: center;
}

.error-msg.show {
  display: block;
}

.btn-form {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--btn-active);
  color: #fff;
  padding: 0.7rem 1.25rem;
  width: 100%;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: inherit;
  transition: background-color 0.25s ease;
  border: 0;
  outline: none;
  border-radius: 0.75rem;
  cursor: pointer;
  margin-top: 4px;
  text-decoration: none;
}

.btn-form:hover:not(:disabled) {
  background-color: var(--btn-active-hover);
  color: #fff;
}

.btn-form:disabled {
  background-color: var(--btn-disabled);
  color: #fff;
  opacity: 1;
  cursor: not-allowed;
}

.btn-form.loading {
  pointer-events: none;
}

.btn-form .spinner {
  display: none;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-form.loading .btn-label {
  display: none;
}

.btn-form.loading .spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.legalsBtn {
  display: block;
  font-size: 0.58rem;
  line-height: 1.35;
  margin: 10px auto 0;
  text-align: center;
  color: #999;
  opacity: 0.9;
}

.footer {
  background-color: var(--footer-bg);
  padding: 14px 16px 18px;
  border-top: 1px solid #dee2e6;
  width: 100%;
}

.footer-inner {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
}

.footer-text {
  font-size: 0.58rem;
  text-align: center;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.footer-links a {
  font-size: 0.58rem;
  color: var(--muted);
  text-decoration: underline;
  padding: 0 0.5rem;
  border-left: 1px solid #ccc;
}

.pin-panel {
  display: none;
  margin-top: 0.25rem;
}

.pin-panel.active {
  display: block;
}

.success-msg {
  display: none;
  text-align: center;
  color: var(--btn-active);
  font-weight: 700;
  margin-top: 0.75rem;
}

.success-msg.show {
  display: block;
}

@media (max-width: 575.98px) {
  .form-title {
    font-size: 1.2rem;
  }

  .btn-form {
    font-size: 1.15rem;
  }
}
