/* Signup specific styles */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 2000; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: var(--radius2);
  padding: 40px; width: 90%; max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); position: relative;
  max-height: 90vh; overflow-y: auto;
  min-height: 300px;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--light); border: none; border-radius: 50%;
  width: 32px; height: 32px; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.modal-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.modal-sub { font-size: 14px; color: var(--mid); margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 8px; }
.form-input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit;
  transition: border-color .2s; outline: none;
}
.form-input:focus { border-color: var(--red); }

.modal-brand {
  display: flex; align-items: center; gap: 8px;
  justify-content: center; margin-bottom: 20px;
}
.modal-brand-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--grad1);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--white); font-family: 'Noto Serif SC', serif;
  font-weight: 700;
}
.modal-brand-text {
  font-size: 18px; font-weight: 800; color: var(--dark);
}
.modal-brand-text span { color: var(--red); }

.modal-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 22px 0 16px; color: var(--mid); font-size: 13px;
}
.modal-divider::before, .modal-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.modal-back {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--mid); font-size: 13px; font-weight: 600;
  padding: 0; margin-bottom: 18px; transition: color .2s;
}
.modal-back:hover { color: var(--dark); }

.btn-outline-modal {
  width: 100%; padding: 13px;
  background: transparent; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 14px; font-weight: 700;
  color: var(--dark); cursor: pointer; transition: all .2s;
  text-align: center; display: block;
}
.btn-outline-modal:hover {
  background: var(--light); border-color: var(--red); color: var(--red);
}

.form-link {
  font-size: 12px; color: var(--mid); text-decoration: underline; transition: color .2s;
}
.form-link:hover { color: var(--red); }

.auth-error {
  background: rgba(196,30,58,0.08);
  border: 1px solid rgba(196,30,58,0.25);
  color: var(--red);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.5;
  display: none;
}

/* Custom styles for registration form */
.rf-field {
  display:flex; align-items:center; gap:10px; margin-bottom:12px;
}
.rf-label {
  width:88px; flex-shrink:0;
  font-size:12.5px; font-weight:600; color:#374151;
  text-align:right; line-height:1.4; margin:0;
}
.rf-label small {
  display:block; font-size:10.5px; font-weight:400;
  color:#94a3b8; margin-top:2px; line-height:1.3;
}
.rf-field > .rf-input,
.rf-field > select.rf-input { flex:1; margin:0; }
.rf-input {
  padding:9px 12px; border:1.5px solid #e2e8f0;
  border-radius:9px; font-size:13.5px; color:#1e293b;
  background:#f8fafc; box-sizing:border-box; outline:none;
  transition:border-color .15s, background .15s, box-shadow .15s;
  width:100%;
}
.rf-input:focus {
  border-color:#2563eb; background:#fff;
  box-shadow:0 0 0 3px rgba(37,99,235,.09);
}
.rf-input::placeholder { color:#94a3b8; }

.rf-divider {
  display:flex; align-items:center; gap:10px;
  margin:20px 0 16px;
}
.rf-divider-line { flex:1; height:1px; background:#e2e8f0; }
.rf-divider-label {
  font-size:11px; font-weight:700; color:#94a3b8;
  letter-spacing:.08em; text-transform:uppercase; white-space:nowrap;
}

.verify-tabs {
  display:flex; gap:6px; margin-bottom:14px;
}
.verify-tab {
  flex:1; padding:9px 6px; border:1.5px solid #e2e8f0;
  border-radius:9px; background:#f8fafc;
  font-size:12.5px; font-weight:600; color:#64748b;
  cursor:pointer; transition:all .2s; text-align:center;
}
.verify-tab.active {
  background:#2563eb; color:#fff; border-color:#2563eb;
  box-shadow:0 2px 8px rgba(37,99,235,.25);
}

.phone-row { display:flex; gap:6px; align-items:center; }
.cc-select {
  flex-shrink:0; width:114px; padding:10px 7px;
  border:1.5px solid #e2e8f0; border-radius:9px;
  font-size:12px; background:#f8fafc; color:#1e293b;
  cursor:pointer; outline:none; transition:border-color .15s;
}
.cc-select:focus { border-color:#2563eb; }

.btn-send {
  white-space:nowrap; padding:10px 13px;
  background:#334155; color:#fff; border:none; border-radius:9px;
  font-size:12px; font-weight:700; cursor:pointer;
  flex-shrink:0; transition:background .15s;
}
.btn-send:hover:not(:disabled) { background:#1e293b; }
.btn-send:disabled { background:#94a3b8; cursor:not-allowed; }
.btn-confirm {
  white-space:nowrap; padding:10px 14px;
  background:#16a34a; color:#fff; border:none; border-radius:9px;
  font-size:12px; font-weight:700; cursor:pointer; flex-shrink:0;
}
.btn-confirm:disabled { background:#86efac; cursor:not-allowed; }

.otp-row { display:flex; gap:6px; align-items:center; margin-top:8px; }
.otp-input {
  flex:1; padding:10px 13px; border:1.5px solid #e2e8f0;
  border-radius:9px; font-size:20px; font-weight:700;
  letter-spacing:8px; text-align:center; font-family:monospace;
  background:#f8fafc; outline:none; color:#1e293b;
  transition:border-color .15s; box-sizing:border-box;
}
.otp-input:focus { border-color:#2563eb; background:#fff; }
.otp-timer { font-size:12px; color:#d97706; font-weight:700; min-width:32px; text-align:center; }

.verify-msg { font-size:12px; margin-top:6px; display:none; padding-left:2px; }

.verified-badge {
  display:flex; align-items:center; gap:8px;
  padding:10px 14px; background:#f0fdf4;
  border:1.5px solid #86efac; border-radius:9px;
  font-size:13px; color:#15803d; font-weight:600;
}

.email-target-box {
  flex:1; padding:10px 13px; background:#f1f5f9;
  border:1.5px solid #e2e8f0; border-radius:9px;
  font-size:13px; color:#374151; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap;
}

@media (max-width: 768px) {
  .modal { padding: 24px; }
  .modal-title { font-size: 20px; }
  .modal-sub { font-size: 13px; }
  .form-input { padding: 11px 14px; font-size: 13px; }
  .rf-label { width: 60px; font-size: 11px; }
  .cc-select { width: 90px; font-size: 11px; }
}
