/* ===== file: /assets/css/signup.css =====
   SIGNUP — PREMIUM CENTERED + COUNTRY SELECTOR
   ✅ Keep premium centered layout
   ✅ Add phone country selector with flags + dial code
   ✅ Dropdown visible above card
   ✅ Desktop long country names fixed
   ✅ Mobile preserved
==================================================== */

:root {
  --su-mini-h: 64px;
  --su-radius-xl: 28px;
  --su-radius-lg: 18px;

  --su-msg-info: rgba(255, 255, 255, 0.92);
  --su-msg-err: #ff4d4f;
  --su-msg-ok: #22c55e;

  --su-msg-bg: rgba(255, 255, 255, 0.10);
  --su-msg-br: rgba(255, 255, 255, 0.18);
}

/* =========================
   SCROLL
========================= */
html,
body {
  height: 100%;
}

body.signup-page {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) rgba(2, 6, 23, 0.25);
}

body.signup-page::-webkit-scrollbar {
  width: 10px;
}

body.signup-page::-webkit-scrollbar-track {
  background: rgba(2, 6, 23, 0.25);
}

body.signup-page::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  border: 2px solid rgba(2, 6, 23, 0.25);
}

body.signup-page::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.38);
}

/* =========================
   Background
========================= */
.su-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}

.su-bg__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: none !important;
  transform: translateZ(0);
}

.su-bg__overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 650px at 20% 30%, rgba(0, 128, 55, 0.20), transparent 60%),
    radial-gradient(900px 600px at 80% 40%, rgba(34, 193, 195, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.58));
}

.su-bg__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.08;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

/* =========================
   Center layout
========================= */
.su-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px 16px;
}

.su-shell {
  width: min(720px, 100%);
  display: grid;
  gap: 14px;
}

/* =========================
   Mini header
========================= */
.su-mini {
  min-height: var(--su-mini-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--su-radius-lg);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  transform: translateY(18px);
  opacity: 0;
  animation: suFadeUp 0.75s ease-out forwards;
}

@keyframes suFadeUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.su-mini__brand,
.su-mini__right {
  min-width: 0;
}

.su-mini__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.96);
  flex: 1 1 auto;
}

.su-mini__logo {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
  flex: 0 0 auto;
}

.su-mini__name {
  font-weight: 1000;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.su-mini__right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.su-mini__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 1000;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}

.su-mini__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 1000;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.98);
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(90deg, rgba(0, 128, 55, 0.35), rgba(34, 193, 195, 0.30));
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: 0.18s ease;
}

.su-mini__back:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  background: linear-gradient(90deg, rgba(0, 128, 55, 0.45), rgba(34, 193, 195, 0.38));
}

/* =========================
   Card
========================= */
.su-card {
  position: relative;
  border-radius: var(--su-radius-xl);
  overflow: visible;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.45),
    0 12px 26px rgba(0, 0, 0, 0.26);
  transform: translateY(18px);
  opacity: 0;
  animation: suFadeUp 0.75s ease-out forwards;
}

.su-card::before {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, rgba(0, 128, 55, 0.90), rgba(34, 193, 195, 0.90));
  opacity: 0.88;
  border-radius: 28px 28px 0 0;
}

.su-card__head {
  text-align: center;
  padding: 28px 32px 0;
}

.su-title {
  margin: 8px 0 0;
  font-size: 42px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.2px;
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.30);
}

.su-subtitle {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14.8px;
  line-height: 1.9;
}

/* =========================
   Form
========================= */
.su-form {
  position: relative;
  padding: 18px 32px 26px;
  display: grid;
  gap: 16px;
  overflow: visible;
}

.su-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.su-row .field {
  flex: 1 1 0;
}

.field {
  position: relative;
  overflow: visible;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.95);
  font-size: 13.5px;
}

.field input,
.field select {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.95);
  outline: none;
  padding: 0 14px;
  transition: 0.18s ease;
  font-size: 14px;
}

.input-ltr {
  direction: ltr;
  text-align: left;
}

.field input::placeholder {
  color: rgba(15, 23, 42, 0.55);
}

.field input:focus,
.field select:focus {
  border-color: rgba(0, 128, 55, 0.85);
  box-shadow: 0 0 0 4px rgba(0, 128, 55, 0.18);
  background: rgba(255, 255, 255, 0.99);
  transform: translateY(-1px);
}

/* =========================
   PHONE FIELD + COUNTRY SELECTOR
========================= */
.su-phone-field {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
  gap: 12px;
  direction: ltr;
  align-items: stretch;
  overflow: visible;
}

.su-phone-field>* {
  min-width: 0;
}

.su-country-select {
  position: relative;
  z-index: 60;
  min-width: 0;
  overflow: visible;
}

.su-country-trigger {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  font: inherit;
  color: #0f172a;
  transition: 0.18s ease;
}

.su-country-trigger:hover {
  background: rgba(255, 255, 255, 0.99);
}

.su-country-trigger:focus-visible {
  outline: none;
  border-color: rgba(0, 128, 55, 0.85);
  box-shadow: 0 0 0 4px rgba(0, 128, 55, 0.18);
  transform: translateY(-1px);
}

.su-country-trigger-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.su-country-flag {
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.10);
  flex: 0 0 auto;
}

.su-country-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  direction: ltr;
}

.su-country-dial {
  font-size: 14px;
  font-weight: 1000;
  color: #008037;
  white-space: nowrap;
}

.su-country-name {
  display: block;
  min-width: 0;
  width: 100%;
  font-size: 13px;
  font-weight: 900;
  color: #334155;
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.su-country-caret {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid #1e293b;
  flex: 0 0 auto;
  transition: transform 0.18s ease;
}

.su-country-select.open .su-country-caret {
  transform: rotate(180deg);
}

.su-country-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 9999;
  display: none;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.22);
}

.su-country-select.open .su-country-menu {
  display: block;
}

.su-country-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  background: transparent;
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  transition: 0.16s ease;
}

.su-country-option:hover {
  background: rgba(0, 128, 55, 0.08);
}

.su-country-option:focus-visible {
  outline: none;
  background: rgba(0, 128, 55, 0.12);
}

.su-country-option.is-active {
  background: rgba(0, 128, 55, 0.12);
}

.su-country-option-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  direction: ltr;
}

.su-country-option-name {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.su-country-option-dial {
  font-size: 14px;
  font-weight: 1000;
  color: #008037;
  white-space: nowrap;
}

#phone {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
}

/* =========================
   password
========================= */
.su-pass {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.su-pass input {
  flex: 1 1 auto;
}

.su-pass__toggle {
  width: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: 0.18s ease;
  color: rgba(15, 23, 42, 0.75);
}

.su-pass__toggle:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

.su-pass__toggle.is-on {
  border-color: rgba(0, 128, 55, 0.25);
  color: rgba(0, 128, 55, 0.95);
}

.su-hint {
  margin-top: -6px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
  font-size: 12.5px;
}

/* =========================
   button
========================= */
.su-btn {
  height: 52px;
  border-radius: 16px;
  font-weight: 1000;
  font-size: 15px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(90deg, #008037, #22c1c3);
  box-shadow: 0 16px 30px rgba(0, 128, 55, 0.22);
  transition: 0.22s ease;
  margin-top: 10px;
}

.su-btn:hover {
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.06);
  box-shadow:
    0 22px 44px rgba(0, 128, 55, 0.38),
    0 0 0 4px rgba(0, 128, 55, 0.14);
}

.su-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none !important;
  filter: none !important;
}

/* =========================
   message
========================= */
.su-msg {
  min-height: 18px;
  margin: 8px 0 0;
  text-align: center;
  font-weight: 1000;
  white-space: pre-line;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--su-msg-bg);
  border: 1px solid var(--su-msg-br);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  color: var(--su-msg-info);
}

.su-msg:empty {
  display: none;
}

.su-msg[data-type="info"] {
  color: var(--su-msg-info);
}

.su-msg[data-type="error"] {
  color: var(--su-msg-err);
  background: rgba(255, 77, 79, 0.12);
  border-color: rgba(255, 77, 79, 0.30);
}

.su-msg[data-type="success"] {
  color: var(--su-msg-ok);
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.30);
}

/* =========================
   footer note
========================= */
.su-foot {
  margin: 6px 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13.5px;
}

.su-foot a {
  color: #e0f2fe;
  text-decoration: underline;
}

.su-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 92px;
  background: radial-gradient(260px 92px at 50% 100%, rgba(0, 128, 55, 0.18), transparent 65%);
  pointer-events: none;
}

/* =========================
   Desktop fine tuning
========================= */
@media (min-width: 641px) {
  .su-country-trigger {
    height: 52px;
    padding: 0 16px;
  }

  .su-country-trigger-main {
    gap: 8px;
  }

  .su-country-meta {
    gap: 6px;
  }

  .su-country-dial,
  .su-country-option-dial {
    font-size: 13px;
  }

  .su-country-name,
  .su-country-option-name {
    font-size: 13px;
  }
}

/* =========================
   Mobile
========================= */
@media (max-width: 640px) {
  .su-phone-field {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .su-country-menu {
    max-height: 260px;
  }
}

@media (max-width: 520px) {
  .su-wrap {
    padding: 14px 14px;
    place-items: center;
  }

  .su-mini {
    border-radius: 16px;
    padding: 10px 10px;
    gap: 10px;
  }

  .su-mini__badge {
    display: none !important;
  }

  .su-mini__back {
    height: 38px;
    padding: 0 10px;
    font-size: 12px;
  }

  .su-mini__brand {
    flex: 1 1 auto;
  }

  .su-mini__name {
    font-size: 13px;
    max-width: 100%;
  }

  .su-card__head {
    padding: 24px 18px 0;
  }

  .su-form {
    padding: 18px 18px 24px;
    gap: 15px;
  }

  .su-title {
    font-size: 36px;
  }

  .su-row {
    flex-direction: column;
  }

  .su-btn {
    margin-top: 12px;
  }

  .su-msg {
    padding: 10px 10px;
    border-radius: 12px;
  }

  .su-country-trigger,
  #phone {
    height: 48px;
  }

  .su-country-name,
  .su-country-option-name,
  .su-country-dial,
  .su-country-option-dial {
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .su-mini__back {
    display: none;
  }
}